net.minecraft.block

## Class BlockLeaves

- java.lang.Object
- - net.minecraft.block.Block
  - - net.minecraft.block.BlockLeavesBase
    - - net.minecraft.block.BlockLeaves

- All Implemented Interfaces:
    IShearable
  Direct Known Subclasses:
    BlockNewLeaf, BlockOldLeaf

      public abstract class BlockLeaves
      extends BlockLeavesBase
      implements IShearable

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.block.Block

      `Block.SoundType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `field_150127_b`
    `protected IIcon[][]` | `field_150129_M`

    - ### Fields inherited from class net.minecraft.block.BlockLeavesBase

      `field_150121_P`

    - ### Fields inherited from class net.minecraft.block.Block

      `blockConstructorCalled, blockHardness, blockIcon, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, canBlockGrass, capturedDrops, captureDrops, enableStats, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, opaque, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, textureName, useNeighborBrightness`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockLeaves()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginLeavesDecay(World world, int x, int y, int z)` Called when a leaf should start its decay process.
    `void` | `breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)`
    `int` | `colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)`
    `protected ItemStack` | `createStackedBlock(int p_149644_1_)`
    `int` | `damageDropped(int p_149692_1_)`
    `void` | `dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)`
    `protected int` | `func_150123_b(int p_150123_1_)`
    `protected void` | `func_150124_c(World p_150124_1_, int p_150124_2_, int p_150124_3_, int p_150124_4_, int p_150124_5_, int p_150124_6_)`
    `abstract java.lang.String[]` | `func_150125_e()`
    `int` | `getBlockColor()`
    `java.util.ArrayList<ItemStack>` | `getDrops(World world, int x, int y, int z, int metadata, int fortune)` This returns a complete list of items dropped from this block.
    `abstract IIcon` | `getIcon(int var1, int var2)`
    `Item` | `getItemDropped(int p_149650_1_, java.util.Random p_149650_2_, int p_149650_3_)`
    `int` | `getRenderColor(int p_149741_1_)`
    `void` | `harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)`
    `boolean` | `isLeaves(IBlockAccess world, int x, int y, int z)` Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
    `boolean` | `isOpaqueCube()`
    `boolean` | `isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)` Checks if the object is currently shearable Example: Sheep return false when they have no wool
    `java.util.ArrayList<ItemStack>` | `onSheared(ItemStack item, IBlockAccess world, int x, int y, int z, int fortune)` Performs the shear function on this object.
    `int` | `quantityDropped(java.util.Random p_149745_1_)`
    `void` | `randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, java.util.Random p_149734_5_)`
    `void` | `setGraphicsLevel(boolean p_150122_1_)`
    `void` | `updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, java.util.Random p_149674_5_)`

    - ### Methods inherited from class net.minecraft.block.BlockLeavesBase

      `shouldSideBeRendered`

    - ### Methods inherited from class net.minecraft.block.Block

      `addCollisionBoxesToList, addDestroyEffects, addHitEffects, canBeReplacedByLeaves, canBlockStay, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canProvidePower, canRenderInPass, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, createTileEntity, disableStats, dropBlockAsItem, dropBlockAsItem, dropXpOnBlockBreak, fillWithRain, func_149698_L, func_149730_j, func_149735_b, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlocksMovement, getBlockTextureFromSide, getCanBlockGrass, getCollisionBoundingBoxFromPool, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIcon, getIdFromBlock, getItem, getItemIconName, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderBlockPass, getRenderType, getSelectedBoundingBoxFromPool, getSubBlocks, getTextureName, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isLadder, isNormalCube, isNormalCube, isProvidingStrongPower, isProvidingWeakPower, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isWood, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPlacedBy, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onNeighborBlockChange, onNeighborChange, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDroppedWithBonus, recolourBlock, registerBlockIcons, registerBlocks, removedByPlayer, renderAsNormalBlock, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockName, setBlockTextureName, setBlockUnbreakable, setCreativeTab, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, shouldCheckWeakPower, tickRate, velocityToAddToEntity`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### field_150127_b

          protected int field_150127_b

    - #### field_150129_M

          protected IIcon[][] field_150129_M

  - ### Constructor Detail

    - #### BlockLeaves

          public BlockLeaves()

  - ### Method Detail

    - #### getBlockColor

          public int getBlockColor()

      Overrides:
        `getBlockColor` in class `Block`

    - #### getRenderColor

          public int getRenderColor(int p_149741_1_)

      Overrides:
        `getRenderColor` in class `Block`

    - #### colorMultiplier

          public int colorMultiplier(IBlockAccess p_149720_1_,
                            int p_149720_2_,
                            int p_149720_3_,
                            int p_149720_4_)

      Overrides:
        `colorMultiplier` in class `Block`

    - #### breakBlock

          public void breakBlock(World p_149749_1_,
                        int p_149749_2_,
                        int p_149749_3_,
                        int p_149749_4_,
                        Block p_149749_5_,
                        int p_149749_6_)

      Overrides:
        `breakBlock` in class `Block`

    - #### updateTick

          public void updateTick(World p_149674_1_,
                        int p_149674_2_,
                        int p_149674_3_,
                        int p_149674_4_,
                        java.util.Random p_149674_5_)

      Overrides:
        `updateTick` in class `Block`

    - #### randomDisplayTick

          public void randomDisplayTick(World p_149734_1_,
                               int p_149734_2_,
                               int p_149734_3_,
                               int p_149734_4_,
                               java.util.Random p_149734_5_)

      Overrides:
        `randomDisplayTick` in class `Block`

    - #### quantityDropped

          public int quantityDropped(java.util.Random p_149745_1_)

      Overrides:
        `quantityDropped` in class `Block`

    - #### getItemDropped

          public Item getItemDropped(int p_149650_1_,
                            java.util.Random p_149650_2_,
                            int p_149650_3_)

      Overrides:
        `getItemDropped` in class `Block`

    - #### dropBlockAsItemWithChance

          public void dropBlockAsItemWithChance(World p_149690_1_,
                                       int p_149690_2_,
                                       int p_149690_3_,
                                       int p_149690_4_,
                                       int p_149690_5_,
                                       float p_149690_6_,
                                       int p_149690_7_)

      Overrides:
        `dropBlockAsItemWithChance` in class `Block`

    - #### func_150124_c

          protected void func_150124_c(World p_150124_1_,
                           int p_150124_2_,
                           int p_150124_3_,
                           int p_150124_4_,
                           int p_150124_5_,
                           int p_150124_6_)

    - #### func_150123_b

          protected int func_150123_b(int p_150123_1_)

    - #### harvestBlock

          public void harvestBlock(World p_149636_1_,
                          EntityPlayer p_149636_2_,
                          int p_149636_3_,
                          int p_149636_4_,
                          int p_149636_5_,
                          int p_149636_6_)

      Overrides:
        `harvestBlock` in class `Block`

    - #### damageDropped

          public int damageDropped(int p_149692_1_)

      Overrides:
        `damageDropped` in class `Block`

    - #### isOpaqueCube

          public boolean isOpaqueCube()

      Overrides:
        `isOpaqueCube` in class `BlockLeavesBase`

    - #### getIcon

          public abstract IIcon getIcon(int var1,
                      int var2)

      Overrides:
        `getIcon` in class `Block`

    - #### setGraphicsLevel

          public void setGraphicsLevel(boolean p_150122_1_)

    - #### createStackedBlock

          protected ItemStack createStackedBlock(int p_149644_1_)

      Overrides:
        `createStackedBlock` in class `Block`

    - #### func_150125_e

          public abstract java.lang.String[] func_150125_e()

    - #### isShearable

          public boolean isShearable(ItemStack item,
                            IBlockAccess world,
                            int x,
                            int y,
                            int z)

      Description copied from interface: `IShearable`
      Checks if the object is currently shearable Example: Sheep return false when they have no wool
      Specified by:
        `isShearable` in interface `IShearable`
      Parameters:
        `item` - The itemstack that is being used, Possible to be null
        `world` - The current world
        `x` - The X Position
        `y` - The Y Position
        `z` - The Z Position
      Returns:
        If this is shearable, and onSheared should be called.

    - #### onSheared

          public java.util.ArrayList<ItemStack> onSheared(ItemStack item,
                                                 IBlockAccess world,
                                                 int x,
                                                 int y,
                                                 int z,
                                                 int fortune)

      Description copied from interface: `IShearable`
      Performs the shear function on this object. This is called for both client, and server. The object should perform all actions related to being sheared, except for dropping of the items, and removal of the block. As those are handled by ItemShears itself. Returns a list of items that resulted from the shearing process. For entities, they should trust there internal location information over the values passed into this function.
      Specified by:
        `onSheared` in interface `IShearable`
      Parameters:
        `item` - The itemstack that is being used, Possible to be null
        `world` - The current world
        `x` - The X Position
        `y` - The Y Position
        `z` - The Z Position
        `fortune` - The fortune level of the shears being used
      Returns:
        A ArrayList containing all items from this shearing. Possible to be null.

    - #### beginLeavesDecay

          public void beginLeavesDecay(World world,
                              int x,
                              int y,
                              int z)

      Description copied from class: `Block`
      Called when a leaf should start its decay process.
      Overrides:
        `beginLeavesDecay` in class `Block`
      Parameters:
        `world` - The current world
        `x` - X Position
        `y` - Y Position
        `z` - Z Position

    - #### isLeaves

          public boolean isLeaves(IBlockAccess world,
                         int x,
                         int y,
                         int z)

      Description copied from class: `Block`
      Determines if this block is considered a leaf block, used to apply the leaf decay and generation system.
      Overrides:
        `isLeaves` in class `Block`
      Parameters:
        `world` - The current world
        `x` - X Position
        `y` - Y Position
        `z` - Z Position
      Returns:
        true if this block is considered leaves.

    - #### getDrops

          public java.util.ArrayList<ItemStack> getDrops(World world,
                                                int x,
                                                int y,
                                                int z,
                                                int metadata,
                                                int fortune)

      Description copied from class: `Block`
      This returns a complete list of items dropped from this block.
      Overrides:
        `getDrops` in class `Block`
      Parameters:
        `world` - The current world
        `x` - X Position
        `y` - Y Position
        `z` - Z Position
        `metadata` - Current metadata
        `fortune` - Breakers fortune level
      Returns:
        A ArrayList containing all items this block drops