Options
All
  • Public
  • Public/Protected
  • All
Menu

Object containing all the food properties of the specific item. Returned by ItemsModule.getFood

since

1.4

Hierarchy

Index

Methods

  • canAlwaysEat(): boolean
  • since

    1.4

    Returns boolean

    true if the following food can be eaten even when the player has full food stats. By default this property is false, the only vanilla food items with this property set to true are golden apple and enchanted apple.

  • clone(): any
  • equals(param0: any): boolean
  • finalize(): void
  • getCooldownTime(): number
  • since

    1.4

    Returns number

    cooldown time of the following food item, 0 by default. The only vanilla food item with cooldown time is chorus fruit.

  • since

    1.4

    Returns String

    cooldown type of the following food item, or null if it was not specified. The only known vanilla food cooldown type is chorusfruit.

  • since

    1.4

    Returns List<Effect>

    list of potion effects applied to the player when eating the following food.

  • getItem(): number
  • getNutrition(): number
  • since

    1.4

    Returns number

    the amount of nutrition points added to the player's food stats when eating the food. 2 nutrition = 1 hunger bar.

  • getOnUseAction(): number
  • since

    1.4

    Returns number

    numeric ID of the action that will be performed after eating the food.

    • -1 -> unknown (not specified)
    • 0 -> chorus teleport
    • 1 -> suspicious stew effect
  • getPointer(): number
  • Returns number

    pointer to the native object wrapped by the following native interface object, represented by a signed 64-bit integer

  • getRemoveEffects(): List<number>
  • since

    1.4

    Returns List<number>

    list of numeric IDs of potion effects that will be removed from the player if present, when eating the following food.

  • getSaturation(): number
  • since

    1.4

    Returns number

    the amount of saturation points added to the player's food stats when eating the food.

  • getSaturationModifier(): number
  • since

    1.4

    Returns number

    the saturation modifier that is used in calculating the amount of saturation points added to the player's food stats when eating the food. The formula is saturation = nutrition * saturationModifier

  • since

    1.4

    Returns String

    the name ID of the item, that will be added to the inventory after eating the food (for example, mushroom stew -> "bowl"), or null if this item was not specified.

  • hashCode(): number
  • notify(): void
  • notifyAll(): void
  • toString(): string
  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void

Generated using TypeDoc