public class FoodStats
extends java.lang.Object
コンストラクタと説明 |
---|
FoodStats() |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addExhaustion(float exhaustion)
adds input to foodExhaustionLevel to a max of 40
|
void |
addStats(int foodLevelIn,
float foodSaturationModifier)
Add food stats.
|
void |
consume(Item maybeFood,
ItemStack stack) |
int |
getFoodLevel()
Get the player's food level.
|
float |
getSaturationLevel()
Get the player's food saturation level.
|
boolean |
needFood()
Get whether the player must eat food.
|
void |
read(CompoundNBT compound)
Reads the food data for the player.
|
void |
setFoodLevel(int foodLevelIn) |
void |
setFoodSaturationLevel(float foodSaturationLevelIn) |
void |
tick(PlayerEntity player)
Handles the food game logic.
|
void |
write(CompoundNBT compound)
Writes the food data for the player.
|
public void addStats(int foodLevelIn, float foodSaturationModifier)
public void tick(PlayerEntity player)
public void read(CompoundNBT compound)
public void write(CompoundNBT compound)
public int getFoodLevel()
public boolean needFood()
public void addExhaustion(float exhaustion)
public float getSaturationLevel()
public void setFoodLevel(int foodLevelIn)
public void setFoodSaturationLevel(float foodSaturationLevelIn)