public abstract class BlockLeaves extends Block implements IShearable
Block.EnumOffsetType
IForgeRegistryEntry.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, hasTileEntity, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightness
delegate
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) |
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) |
BlockRenderLayer |
getBlockLayer() |
void |
getDrops(NonNullList<ItemStack> drops,
IBlockAccess world,
BlockPos pos,
IBlockState state,
int fortune)
This gets a complete list of items dropped from this block.
|
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune) |
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) |
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) |
void |
randomDisplayTick(IBlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
void |
setGraphicsLevel(boolean fancy) |
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, getBlockFaceShape, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getBoundingBox, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getMobilityFlag, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, 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, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullCube, isLadder, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTopSolid, 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, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, tickRate, toString, withMirror, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onSheared
public 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 Block
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class Block
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
randomDisplayTick
in class Block
public int quantityDropped(java.util.Random random)
quantityDropped
in class Block
public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped
in class Block
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
dropBlockAsItemWithChance
in class Block
protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance)
protected int getSaplingDropChance(IBlockState state)
public boolean isOpaqueCube(IBlockState state)
isOpaqueCube
in class Block
public void setGraphicsLevel(boolean fancy)
public BlockRenderLayer getBlockLayer()
getBlockLayer
in class Block
public boolean causesSuffocation(IBlockState state)
causesSuffocation
in class Block
public abstract BlockPlanks.EnumType getWoodType(int meta)
public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearable
isShearable
in interface IShearable
item
- 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)
Block
public void beginLeavesDecay(IBlockState state, World world, BlockPos pos)
Block
beginLeavesDecay
in class Block
state
- The current stateworld
- The current worldpos
- Block position in worldpublic void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Block
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
shouldSideBeRendered
in class Block