Options
All
  • Public
  • Public/Protected
  • All
Menu

Object used in updated Item.createFoodItem method, containing many properties that weren't accessible before without more low-level code like Item.setProperties.

since

1.0

Hierarchy

  • FoodParamsDescription

Index

Properties

can_always_eat?: boolean

Whether the food item can be eaten even if the player has full food stats. Defaults to false.

cooldown_time?: number

Cooldown the food item is set on after being eaten by a player. Defaults to 0 (no cooldown).

cooldown_type?: "chorusfruit" | "none"

Same as cooldown_time, but using pre-defined string cooldown types instead of integer values. Defaults to "none" (no cooldown).

effects?: FoodEffect[]

List of potion effects that are added to the player who had eaten the food item.

food?: number

Amount of nutrition points refilled by the food item, defaults to 1.

isTech?: boolean

If true, the food item will not be displayed in creative inventory, defaults to false.

is_meat?: boolean

Adds is_meat tag to the food item, which means this item will be able to be eaten by dogs to restore their health. Defaults to false.

nutrition?: number

Same as food.

on_use_action?: "none" | "chorus_teleport" | "suspicious_stew_effect"

One of pre-defined string types of action that is performed when the food item is eaten. Defaults to "none" (no action).

on_use_range?: [number, number, number]

Unknown property, defaults to [ 0.0, 0.0, 0.0 ].

remove_effects?: number[]

List of numeric IDs of potion effects that are removed from the player who had eaten the food item.

saturation_modifier?: string | number

Saturation modifier used to calculate amount of saturation points refilled by the food item, by the formula nutrition * saturationModifier. Can be one of string types defined by vanilla, custom string type registered with ItemsModule.newFoodSaturationModifier or a floating point value. Defaults to 1.2 ("normal").

stack?: number

Maximum stack size of the food item, defaults to 64.

using_converts_to?: any_string

Name ID of the item that the food item is converted to after being eaten. In vanilla it's used, for example, for stews (converted to bowls). Defaults to empty string (doesn't convert to any item).

Generated using TypeDoc