public abstract class BlockLeaves extends Block implements IShearable
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
static PropertyBool |
CHECK_DECAY |
static PropertyBool |
DECAYABLE |
protected boolean |
leavesFancy |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightnessdelegate| Constructor and Description |
|---|
BlockLeaves() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginLeavesDecay(IBlockState state,
World world,
BlockPos pos)
Called when a leaf should start its decay process.
|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state)
Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
|
boolean |
causesSuffocation(IBlockState state) |
protected void |
dropApple(World worldIn,
BlockPos pos,
IBlockState state,
int chance) |
void |
dropBlockAsItemWithChance(World worldIn,
BlockPos pos,
IBlockState state,
float chance,
int fortune)
Spawns this Block's drops into the World as EntityItems.
|
BlockRenderLayer |
getBlockLayer() |
java.util.List<ItemStack> |
getDrops(IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This returns a complete list of items dropped from this block.
|
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
protected int |
getSaplingDropChance(IBlockState state) |
abstract BlockPlanks.EnumType |
getWoodType(int meta) |
boolean |
isLeaves(IBlockState state,
IBlockAccess world,
BlockPos pos)
Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
|
boolean |
isOpaqueCube(IBlockState state)
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
boolean |
isShearable(ItemStack item,
IBlockAccess world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
int |
quantityDropped(java.util.Random random)
Returns the quantity of items to drop on block destruction.
|
void |
randomDisplayTick(IBlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
void |
setGraphicsLevel(boolean fancy)
Pass true to draw this block using fancy graphics, or false for fast graphics.
|
boolean |
shouldSideBeRendered(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, canBeConnectedTo, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, createBlockState, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getBoundingBox, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getMobilityFlag, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSoundType, getSoundType, getStateById, getStateForPlacement, getStateForPlacement, getStateFromMeta, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullCube, isFullyOpaque, isLadder, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isWood, modifyAcceleration, neighborChanged, observedNeighborChange, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDroppedWithBonus, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, tickRate, toString, withMirror, withRotationgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonShearedpublic static final PropertyBool DECAYABLE
public static final PropertyBool CHECK_DECAY
protected boolean leavesFancy
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock in class Blockpublic void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick in class Blockpublic void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
randomDisplayTick in class Blockpublic int quantityDropped(java.util.Random random)
quantityDropped in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockpublic void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
dropBlockAsItemWithChance in class Blockprotected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance)
protected int getSaplingDropChance(IBlockState state)
public boolean isOpaqueCube(IBlockState state)
isOpaqueCube in class Blockpublic void setGraphicsLevel(boolean fancy)
public BlockRenderLayer getBlockLayer()
getBlockLayer in class Blockpublic boolean causesSuffocation(IBlockState state)
causesSuffocation in class Blockpublic abstract BlockPlanks.EnumType getWoodType(int meta)
public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearableisShearable in interface IShearableitem - The itemstack that is being used, Possible to be nullworld - The current worldpos - Block's position in world.public boolean isLeaves(IBlockState state, IBlockAccess world, BlockPos pos)
Blockpublic void beginLeavesDecay(IBlockState state, World world, BlockPos pos)
BlockbeginLeavesDecay in class Blockstate - The current stateworld - The current worldpos - Block position in worldpublic java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Blockpublic boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
shouldSideBeRendered in class Block