Class BlockFlower

Direct Known Subclasses:
BlockCrops, BlockDeadBush, BlockLilyPad, BlockMushroom, BlockNetherStalk, BlockSapling, BlockStem, BlockTallGrass, FlowerBlock

public class BlockFlower extends PlantsBlock
  • Constructor Details

    • BlockFlower

      protected BlockFlower(int par1, Material par2Material)
      FCNOTE: This class would be better called BlockPlants, as it acts as a common base class for vegetation and crops.
    • BlockFlower

      protected BlockFlower(int par1)
  • Method Details

    • onNeighborBlockChange

      public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
      // +++START EDIT+++ // ---END EDIT--- 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
      Overrides:
      onNeighborBlockChange in class Block
    • 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 Block
    • checkFlowerChange

      protected final void checkFlowerChange(World par1World, int par2, int par3, int par4)
    • getCollisionBoundingBoxFromPool

      public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
      // +++START EDIT+++ // ---END EDIT--- Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
      Overrides:
      getCollisionBoundingBoxFromPool in class PlantsBlock
    • isOpaqueCube

      public boolean isOpaqueCube()
      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 PlantsBlock
    • renderAsNormalBlock

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

      public int getRenderType()
      The type of render function that is called for this block
      Overrides:
      getRenderType 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 PlantsBlock
    • canBeGrazedOn

      public boolean canBeGrazedOn(IBlockAccess blockAccess, int i, int j, int k, EntityAnimal animal)
      Overrides:
      canBeGrazedOn in class Block