Class BlockStem


public class BlockStem extends BlockFlower
  • Field Details

    • fruitType

      protected Block fruitType
      Defines if it is a Melon or a Pumpkin that the stem is producing.
  • Constructor Details

    • BlockStem

      protected BlockStem(int par1, Block par2Block)
  • Method Details

    • canThisPlantGrowOnThisBlockID

      protected boolean canThisPlantGrowOnThisBlockID(int par1)
      Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of blockID passed in. Args: blockID
    • fertilizeStem

      public void fertilizeStem(World par1World, int par2, int par3, int par4)
    • onCreativeBonemealApplied

      public boolean onCreativeBonemealApplied(World world, int x, int y, int z)
      Called when bonemeal is applied in creative mode.
      Overrides:
      onCreativeBonemealApplied in class Block
    • idDropped

      public int idDropped(int par1, Random par2Random, int par3)
      Returns the ID of the items to drop on destruction.
      Overrides:
      idDropped in class Block
    • quantityDropped

      public int quantityDropped(Random par1Random)
      Returns the quantity of items to drop on block destruction.
      Overrides:
      quantityDropped in class Block
    • tickRate

      public int tickRate(World world)
      Description copied from class: Block
      How many world ticks before ticking
      Overrides:
      tickRate in class Block
    • updateTick

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

      public void randomUpdateTick(World world, int i, int j, int k, Random rand)
      Description copied from class: Block
      Called on server only
      Overrides:
      randomUpdateTick in class Block
    • onBlockSawed

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

      public void dropBlockAsItemWithChance(World world, int i, int j, int k, int iMetadata, float fChance, int iFortuneModifier)
      Description copied from class: Block
      Drops the block items with a specified chance of dropping the specified items
      Overrides:
      dropBlockAsItemWithChance in class Block
    • getBlockBoundsFromPoolBasedOnState

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

      public void onNeighborBlockChange(World world, int i, int j, int k, int iBlockID)
      Description copied from class: BlockFlower
      // +++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 BlockFlower
    • canBeGrazedOn

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

      protected boolean canGrowOnBlock(World world, int i, int j, int k)
      Overrides:
      canGrowOnBlock 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
    • setFruitBlock

      public void setFruitBlock(Block block)
    • hasSpaceToGrow

      protected boolean hasSpaceToGrow(World world, int i, int j, int k)
    • canGrowFruitAt

      protected boolean canGrowFruitAt(World world, int i, int j, int k)
    • renderBlock

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

      @Environment(CLIENT) public int colorMultiplier(IBlockAccess blockAccess, int i, int j, int k)
      Description copied from class: Block
      Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called when first determining what to render.
      Overrides:
      colorMultiplier in class Block
    • getState

      @Environment(CLIENT) public int getState(IBlockAccess blockAccess, int i, int j, int k)
    • idPicked

      @Environment(CLIENT) public int idPicked(World par1World, int par2, int par3, int par4)
      Description copied from class: Block
      only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) // +++START EDIT+++ FCNOTE: Client only // ---END EDIT---
      Overrides:
      idPicked in class Block
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister par1IconRegister)
      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
    • getRenderColor

      @Environment(CLIENT) public int getRenderColor(int par1)
      Description copied from class: Block
      Returns the color this block should be rendered. Used by leaves.
      Overrides:
      getRenderColor in class Block
    • getRenderType

      @Environment(CLIENT) public int getRenderType()
      Description copied from class: BlockFlower
      The type of render function that is called for this block
      Overrides:
      getRenderType in class BlockFlower
    • getStemIcon

      @Environment(CLIENT) public Icon getStemIcon()