Class EntityBehaviorHunger
- Namespace
- Vintagestory.GameContent
- Assembly
- VSEssentials.dll
Adds hunger to entity. Allows it to eat and die from starvation.
Uses the "hunger" code Open in GitHub
[DocumentAsJson]
public class EntityBehaviorHunger : EntityBehavior
- Inheritance
-
EntityBehaviorHunger
Examples
"behaviors": [
{
"code": "hunger",
"currentsaturation": 1500.0,
"maxsaturation": 1500.0
},
],
Fields
CurrentSaturation (Optional) (Default: 1500)
The entity will have this much saturation upon spawn if this is set in JSON. Otherwise, this is the current saturation of the entity
[DocumentAsJson("Optional", "1500", false)]
public float Saturation { get; set; }
Field Value
MaxSaturation (Optional) (Default: 1500)
Max possible saturation the entity can have in general
[DocumentAsJson("Optional", "1500", false)]
public float MaxSaturation { get; set; }