public abstract class BlockLeaves extends BlockLeavesBase implements IShearable
Block.EnumOffsetType, Block.SoundType
Modifier and Type | Field and Description |
---|---|
static PropertyBool |
CHECK_DECAY |
static PropertyBool |
DECAYABLE |
protected int |
iconIndex |
protected boolean |
isTransparent |
fancyGraphics
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, field_181083_K, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
Constructor and Description |
---|
BlockLeaves() |
Modifier and Type | Method and Description |
---|---|
void |
beginLeavesDecay(World world,
BlockPos pos)
Called when a leaf should start its decay process.
|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
int |
colorMultiplier(IBlockAccess worldIn,
BlockPos pos,
int renderPass) |
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.
|
int |
getBlockColor() |
EnumWorldBlockLayer |
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.
|
int |
getRenderColor(IBlockState state) |
protected int |
getSaplingDropChance(IBlockState state) |
abstract BlockPlanks.EnumType |
getWoodType(int meta) |
boolean |
isLeaves(IBlockAccess world,
BlockPos pos)
Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
|
boolean |
isOpaqueCube()
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
|
boolean |
isVisuallyOpaque() |
int |
quantityDropped(java.util.Random random)
Returns the quantity of items to drop on block destruction.
|
void |
randomDisplayTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
void |
setGraphicsLevel(boolean fancy)
Pass true to draw this block using fancy graphics, or false for fast graphics.
|
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
shouldSideBeRendered
addCollisionBoxesToList, addDestroyEffects, addHitEffects, addLandingEffects, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, createBlockState, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, 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, isFlowerPot, isFoliage, isFullBlock, isFullCube, isLadder, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isWood, modifyAcceleration, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onNeighborBlockChange, onNeighborChange, onPlantGrow, quantityDropped, quantityDroppedWithBonus, randomTick, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setRegistryName, setRegistryName, setRegistryName, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, tickRate, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onSheared
public static final PropertyBool DECAYABLE
public static final PropertyBool CHECK_DECAY
protected int iconIndex
protected boolean isTransparent
public int getBlockColor()
getBlockColor
in class Block
public int getRenderColor(IBlockState state)
getRenderColor
in class Block
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
colorMultiplier
in class Block
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(World worldIn, BlockPos pos, IBlockState state, 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()
isOpaqueCube
in class BlockLeavesBase
public void setGraphicsLevel(boolean fancy)
public EnumWorldBlockLayer 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(IBlockAccess world, BlockPos pos)
Block
public void beginLeavesDecay(World world, BlockPos pos)
Block
beginLeavesDecay
in class Block
world
- The current worldpos
- Block position in worldpublic java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
Block