Class LegacySaplingBlock


public class LegacySaplingBlock extends BlockSapling
  • Field Details

    • saplingTypes

      public static final String[] saplingTypes
    • baseTextureNames

      public static final String[] baseTextureNames
  • Constructor Details

    • LegacySaplingBlock

      public LegacySaplingBlock(int iBlockID)
  • Method Details

    • updateTick

      public void updateTick(World world, int i, int j, int k, Random random)
      Description copied from class: BlockSapling
      Ticks the block if it's been scheduled
      Overrides:
      updateTick in class BlockSapling
    • onBlockActivated

      public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class PlantsBlock
    • damageDropped

      public int damageDropped(int metadata)
      Description copied from class: BlockSapling
      Determines the damage on the item the block drops. Used in cloth and wood.
      Overrides:
      damageDropped in class BlockSapling
    • growTree

      public void growTree(World world, int x, int y, int z, Random random)
      Description copied from class: BlockSapling
      Attempts to grow a sapling into a tree
      Overrides:
      growTree in class BlockSapling
    • onBlockSawed

      public boolean onBlockSawed(World world, int i, int j, int k)
      Overrides:
      onBlockSawed in class Block
    • canGrowOnBlock

      protected boolean canGrowOnBlock(World world, int i, int j, int k)
      Overrides:
      canGrowOnBlock in class PlantsBlock
    • getSaplingGrowthStage

      public int getSaplingGrowthStage(World world, int i, int j, int k)
    • attemptToGrow

      public void attemptToGrow(World world, int x, int y, int z, Random rand)
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister register)
      Description copied from class: BlockSapling
      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 BlockSapling
    • getIcon

      @Environment(CLIENT) public Icon getIcon(int iSide, int iMetadata)
      Description copied from class: BlockSapling
      From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
      Overrides:
      getIcon in class BlockSapling
    • getSubBlocks

      @Environment(CLIENT) 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 BlockSapling