Class CocoaBeanItem


public class CocoaBeanItem extends FoodItem
  • Field Details

  • Constructor Details

    • CocoaBeanItem

      public CocoaBeanItem(int iItemID)
  • 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
    • attemptPlaceOn

      protected boolean attemptPlaceOn(World world, int i, int j, int k, int iFacing, float fClickX, float fClickY, float fClickZ)
    • getHungerRestored

      public int getHungerRestored()
      Overrides:
      getHungerRestored in class ItemFood
    • 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
    • registerIcons

      @Environment(CLIENT) public void registerIcons(IconRegister register)
      Overrides:
      registerIcons in class FoodItem