YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraft.util.FoodStats Class Reference

Public Member Functions

void addStats (int par1, float par2)
 
void addStats (ItemFood par1ItemFood)
 
void onUpdate (EntityPlayer par1EntityPlayer)
 
void readNBT (NBTTagCompound par1NBTTagCompound)
 
void writeNBT (NBTTagCompound par1NBTTagCompound)
 
int getFoodLevel ()
 
int getPrevFoodLevel ()
 
boolean needFood ()
 
void addExhaustion (float par1)
 
float getSaturationLevel ()
 
void setFoodLevel (int par1)
 
void setFoodSaturationLevel (float par1)
 

Member Function Documentation

void net.minecraft.util.FoodStats.addExhaustion ( float  par1)

adds input to foodExhaustionLevel to a max of 40

void net.minecraft.util.FoodStats.addStats ( int  par1,
float  par2 
)

Args: int foodLevel, float foodSaturationModifier

void net.minecraft.util.FoodStats.addStats ( ItemFood  par1ItemFood)

Eat some food.

int net.minecraft.util.FoodStats.getFoodLevel ( )

Get the player's food level.

int net.minecraft.util.FoodStats.getPrevFoodLevel ( )
float net.minecraft.util.FoodStats.getSaturationLevel ( )

Get the player's food saturation level.

boolean net.minecraft.util.FoodStats.needFood ( )

If foodLevel is not max.

void net.minecraft.util.FoodStats.onUpdate ( EntityPlayer  par1EntityPlayer)

Handles the food game logic.

void net.minecraft.util.FoodStats.readNBT ( NBTTagCompound  par1NBTTagCompound)

Reads food stats from an NBT object.

void net.minecraft.util.FoodStats.setFoodLevel ( int  par1)
void net.minecraft.util.FoodStats.setFoodSaturationLevel ( float  par1)
void net.minecraft.util.FoodStats.writeNBT ( NBTTagCompound  par1NBTTagCompound)

Writes food stats to an NBT object.


The documentation for this class was generated from the following file: