IFoodStats
Link to ifoodstats
The IPlayer interface allows you to view certain information on a player's food Stats.
Importing the package
Link to importing-the-package
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 | Tipo |
---|---|---|
ZenGetter foodLevel | ZenSetter foodLevel | Tipo int |
ZenGetter saturationLevel | ZenSetter saturationLevel | Tipo float |
ZenGetter needFood | ZenSetter | Tipo 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);