Class SeedFoodItem


public class SeedFoodItem extends ItemFood
  • Field Details

    • cropBlockID

      protected int cropBlockID
  • Constructor Details

    • SeedFoodItem

      public SeedFoodItem(int iItemID, int iHealAmount, float fSaturationModifier, int iCropBlockID)
  • Method Details

    • onItemUse

      public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int i, int j, int k, int iFacing, float fClickX, float fClickY, float fClickZ)
      Description copied from class: Item
      Callback for item usage. If the item does something special on right clicking, he will have one of those. Return True if something happen and false if it don't. This is for ITEMS, not BLOCKS
      Overrides:
      onItemUse in class Item
    • onItemUsedByBlockDispenser

      public boolean onItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing)
      Description copied from class: Item
      This method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise. Co-ordinates specify the BD position.
      Overrides:
      onItemUsedByBlockDispenser in class Item
    • getHungerRestored

      public int getHungerRestored()
      Overrides:
      getHungerRestored in class ItemFood
    • playPlaceSound

      protected void playPlaceSound(World world, int i, int j, int k, Block block)