Class WeedsBlock


public class WeedsBlock extends PlantsBlock
  • Field Details

  • Constructor Details

    • WeedsBlock

      public WeedsBlock(int iBlockID)
  • Method Details

    • idDropped

      public int idDropped(int iMetadata, Random rand, int iFortuneModifier)
      Description copied from class: Block
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • breakBlock

      public void breakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Description copied from class: Block
      Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata ??ejects contained items into the world, and notifies neighbours of an update, as appropriate?? // +++START EDIT+++ FCNOTE: Called on server only. Called AFTER block is set, so it is no longer valid at pos. // ---END EDIT---
      Overrides:
      breakBlock in class PlantsBlock
    • onNeighborBlockChange

      public void onNeighborBlockChange(World world, int i, int j, int k, int iNeighborBlockID)
      Description copied from class: Block
      Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT---
      Overrides:
      onNeighborBlockChange in class Block
    • getBlockBoundsFromPoolBasedOnState

      public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      getBlockBoundsFromPoolBasedOnState in class Block
    • removeWeeds

      public void removeWeeds(World world, int i, int j, int k)
      Overrides:
      removeWeeds in class PlantsBlock
    • canWeedsGrowInBlock

      public boolean canWeedsGrowInBlock(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      This determines whether weeds can share space with crop blocks, or grow within their own independent weed blocks
      Overrides:
      canWeedsGrowInBlock in class Block
    • canGrowOnBlock

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

      public static double getWeedsBoundsHeight(int iGrowthLevel)
    • registerIcons

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

      @Environment(CLIENT) public boolean renderBlock(RenderBlocks renderer, int i, int j, int k)
      Overrides:
      renderBlock in class PlantsBlock
    • renderWeeds

      @Environment(CLIENT) public void renderWeeds(Block block, RenderBlocks renderer, int i, int j, int k)
      Note that this will be called by different block types that can support weeds, like the various forms of crops, and thus the block parameter is not necessarily of type FCBlockWeeds