Class BlockSapling

Direct Known Subclasses:
LegacySaplingBlock

public class BlockSapling extends BlockFlower
  • Field Details

    • WOOD_TYPES

      public static final String[] WOOD_TYPES
  • Constructor Details

    • BlockSapling

      protected BlockSapling(int par1)
  • Method Details

    • updateTick

      public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
      Ticks the block if it's been scheduled
      Overrides:
      updateTick in class BlockFlower
    • getIcon

      public Icon getIcon(int par1, int par2)
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class Block
    • markOrGrowMarked

      public void markOrGrowMarked(World par1World, int par2, int par3, int par4, Random par5Random)
    • growTree

      public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
      Attempts to grow a sapling into a tree
    • isSameSapling

      public boolean isSameSapling(World par1World, int par2, int par3, int par4, int par5)
      Determines if the same sapling is present at the given location.
    • damageDropped

      public int damageDropped(int par1)
      Determines the damage on the item the block drops. Used in cloth and wood.
      Overrides:
      damageDropped in class Block
    • getSubBlocks

      public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
      returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
      Overrides:
      getSubBlocks in class Block
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.
      Overrides:
      registerIcons in class Block