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 | Type |
---|---|---|
ZenGetter foodLevel | ZenSetter foodLevel | Type int |
ZenGetter saturationLevel | ZenSetter saturationLevel | Type float |
ZenGetter needFood | ZenSetter | Type 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);