net.minecraft.util
Class FoodStats

java.lang.Object
  extended by net.minecraft.util.FoodStats

public class FoodStats
extends Object


Constructor Summary
FoodStats()
           
 
Method Summary
 void addExhaustion(float par1)
          adds input to foodExhaustionLevel to a max of 40
 void addStats(int par1, float par2)
          Args: int foodLevel, float foodSaturationModifier
 void addStats(ItemFood par1ItemFood)
          Eat some food.
 int getFoodLevel()
          Get the player's food level.
 int getPrevFoodLevel()
           
 float getSaturationLevel()
          Get the player's food saturation level.
 boolean needFood()
          If foodLevel is not max.
 void onUpdate(EntityPlayer par1EntityPlayer)
          Handles the food game logic.
 void readNBT(NBTTagCompound par1NBTTagCompound)
          Reads food stats from an NBT object.
 void setFoodLevel(int par1)
           
 void setFoodSaturationLevel(float par1)
           
 void writeNBT(NBTTagCompound par1NBTTagCompound)
          Writes food stats to an NBT object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FoodStats

public FoodStats()
Method Detail

addStats

public void addStats(int par1,
                     float par2)
Args: int foodLevel, float foodSaturationModifier


addStats

public void addStats(ItemFood par1ItemFood)
Eat some food.


onUpdate

public void onUpdate(EntityPlayer par1EntityPlayer)
Handles the food game logic.


readNBT

public void readNBT(NBTTagCompound par1NBTTagCompound)
Reads food stats from an NBT object.


writeNBT

public void writeNBT(NBTTagCompound par1NBTTagCompound)
Writes food stats to an NBT object.


getFoodLevel

public int getFoodLevel()
Get the player's food level.


getPrevFoodLevel

public int getPrevFoodLevel()

needFood

public boolean needFood()
If foodLevel is not max.


addExhaustion

public void addExhaustion(float par1)
adds input to foodExhaustionLevel to a max of 40


getSaturationLevel

public float getSaturationLevel()
Get the player's food saturation level.


setFoodLevel

public void setFoodLevel(int par1)

setFoodSaturationLevel

public void setFoodSaturationLevel(float par1)