IFoodStats
Link to ifoodstats
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
ZenGetter | ZenSetter | Тип |
---|---|---|
ZenGetter foodLevel | ZenSetter foodLevel | Тип int |
ZenGetter saturationLevel | ZenSetter saturationLevel | Тип float |
ZenGetter needFood | ZenSetter | Тип boolean |
ZenMethods
Link to zenmethods
Adding Stats
Link to adding-stats
Void Function. Takes an int and a float as intput parameters.
ZenScript Copystats.addStats(int foodValue, float saturationLevel);
onUpdate
Link to onupdate
Void Function. Takes an IPlayer object as input parameter.
ZenScript Copystats.onUpdate(IPlayer player);
asNBT
Link to asnbt
Returns an IData Object representing the foodStats.
ZenScript Copystats.asNBT();
stats as crafttweaker.data.IData;
Add Exhaustion
Link to add-exhaustion
Void Funtion. takes a float as input parameter.
ZenScript Copystats.addExhaustion(float exhaustion);