Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 1 out of 2484 tags...
Name<ItemTag.food>
ReturnsMapTag
MechanismItemTag.food
Description(Property) Returns an item's food Language:Item Components.
The map includes keys:
- "nutrition", ElementTag(Number) representing the amount of food points restored by this item.
- "saturation", ElementTag(Decimal) representing the amount of saturation points restored by this item.
- "can_always_eat", ElementTag(Boolean) controlling whether the item can always be eaten, even if the player isn't hungry.
Generated Example
- foreach <player.item_in_hand.food> key:key as:val:
    - narrate "<[key]> is set as <[val]>"
GroupProperties
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/paper/src/main/java/com/denizenscript/denizen/paper/datacomponents/FoodAdapter.java#L11