The IPlayer interface allows you to view certain information on a player's food Stats.

Импорт пакета

Link to импорт-пакета

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.player.IFoodStats;

ZenGetter/ZenSetters

Link to zengetterzensetters

ZenGetterZenSetterТип
ZenGetter
foodLevel
ZenSetter
foodLevel
Тип
int
ZenGetter
saturationLevel
ZenSetter
saturationLevel
Тип
float
ZenGetter
needFood
ZenSetter
Тип
boolean

Void Function. Takes an int and a float as intput parameters.

ZenScript
Copy
stats.addStats(int foodValue, float saturationLevel);

Void Function. Takes an IPlayer object as input parameter.

ZenScript
Copy
stats.onUpdate(IPlayer player);

Returns an IData Object representing the foodStats.

ZenScript
Copy
stats.asNBT();
stats as crafttweaker.data.IData;

Void Funtion. takes a float as input parameter.

ZenScript
Copy
stats.addExhaustion(float exhaustion);