Class PlantsBlock

java.lang.Object
net.minecraft.src.Block
btw.block.blocks.PlantsBlock
Direct Known Subclasses:
BlockFlower, CropsBlock, WeedsBlock

public abstract class PlantsBlock extends Block
  • Constructor Details

    • PlantsBlock

      protected PlantsBlock(int iBlockID, Material material)
  • Method Details

    • isOpaqueCube

      public boolean isOpaqueCube()
      Description copied from class: Block
      // +++START EDIT+++ // ---END EDIT--- Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
      Overrides:
      isOpaqueCube in class Block
    • renderAsNormalBlock

      public boolean renderAsNormalBlock()
      Description copied from class: Block
      If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
      Overrides:
      renderAsNormalBlock in class Block
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
      Overrides:
      getCollisionBoundingBoxFromPool 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 Block
    • onEntityCollidedWithBlock

      public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
      Description copied from class: Block
      Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
      Overrides:
      onEntityCollidedWithBlock in class Block
    • canPlaceBlockAt

      public boolean canPlaceBlockAt(World world, int i, int j, int k)
      Description copied from class: Block
      Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
      Overrides:
      canPlaceBlockAt in class Block
    • canBlockStay

      public boolean canBlockStay(World world, int i, int j, int k)
      Description copied from class: Block
      Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
      Overrides:
      canBlockStay in class Block
    • onBlockActivated

      public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int iFacing, float fXClick, float fYClick, float fZClick)
      Description copied from class: Block
      Called upon block activation (right click on the block.)
      Overrides:
      onBlockActivated in class Block
    • getWeedsGrowthLevel

      public int getWeedsGrowthLevel(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      The growth level of weeds growing out of this block. Range of 0 to 7
      Overrides:
      getWeedsGrowthLevel in class Block
    • removeWeeds

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

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

      public float groundCoverRestingOnVisualOffset(IBlockAccess blockAccess, int i, int j, int k)
      Overrides:
      groundCoverRestingOnVisualOffset in class Block
    • canGroundCoverRestOnBlock

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

      public void clientBreakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata)
      Overrides:
      clientBreakBlock in class Block
    • canGrowOnBlock

      protected boolean canGrowOnBlock(World world, int i, int j, int k)
    • isInBrightLight

      protected boolean isInBrightLight(World world, int x, int y, int z)
    • renderBlock

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