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, isBlockContainer, 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) |
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() |
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) |
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
|
boolean |
isVisuallyOpaque() |
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, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, createBlockState, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAmbientOcclusionLightValue, 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, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSoundType, getStateById, getStateFromMeta, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, getWeakPower, harvestBlock, hasComparatorInputOverride, 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, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlaced, 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, 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
@Nullable 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 isVisuallyOpaque()
isVisuallyOpaque
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 java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Block
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
shouldSideBeRendered
in class Block