Class MushroomItem


public class MushroomItem extends FoodItem
  • Field Details

    • BROWN_MUSHROOM_HUNGER_HEALED

      public static final int BROWN_MUSHROOM_HUNGER_HEALED
      See Also:
    • BROWN_MUSHROOM_SATURATION_MODIFIER

      public static final float BROWN_MUSHROOM_SATURATION_MODIFIER
      See Also:
    • BROWN_MUSHROOM_ITEM_NAME

      public static final String BROWN_MUSHROOM_ITEM_NAME
      See Also:
    • RED_MUSHROOM_HUNGER_HEALED

      public static final int RED_MUSHROOM_HUNGER_HEALED
      See Also:
    • RED_MUSHROOM_SATURATION_MODIFIER

      public static final float RED_MUSHROOM_SATURATION_MODIFIER
      See Also:
    • RED_MUSHROOM_ITEM_NAME

      public static final String RED_MUSHROOM_ITEM_NAME
      See Also:
    • placedBlockID

      public final int placedBlockID
  • Constructor Details

    • MushroomItem

      public MushroomItem(int iItemID, int iHungerHealed, float fSaturationModifier, String sItemName, int iPlacedBlockID)
  • 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