|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.item.Item
net.minecraft.item.ItemFood
public class ItemFood
Field Summary | |
---|---|
int |
itemUseDuration
Number of ticks to run while 'EnumAction'ing until result. |
Constructor Summary | |
---|---|
ItemFood(int par1,
int par2,
boolean par3)
|
|
ItemFood(int par1,
int par2,
float par3,
boolean par4)
|
Method Summary | |
---|---|
int |
getHealAmount()
|
EnumAction |
getItemUseAction(ItemStack par1ItemStack)
returns the action that specifies what animation to play when the items is being used |
int |
getMaxItemUseDuration(ItemStack par1ItemStack)
How long it takes to use or consume an item |
float |
getSaturationModifier()
gets the saturationModifier of the ItemFood |
boolean |
isWolfsFavoriteMeat()
Whether wolves like this food (true for raw and cooked porkchop). |
ItemStack |
onFoodEaten(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer)
|
ItemStack |
onItemRightClick(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer)
Called whenever this item is equipped and the right mouse button is pressed. |
ItemFood |
setAlwaysEdible()
Set the field 'alwaysEdible' to true, and make the food edible even if the player don't need to eat. |
ItemFood |
setPotionEffect(int par1,
int par2,
int par3,
float par4)
sets a potion effect on the item. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int itemUseDuration
Constructor Detail |
---|
public ItemFood(int par1, int par2, float par3, boolean par4)
public ItemFood(int par1, int par2, boolean par3)
Method Detail |
---|
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
onFoodEaten
in class Item
public int getMaxItemUseDuration(ItemStack par1ItemStack)
getMaxItemUseDuration
in class Item
public EnumAction getItemUseAction(ItemStack par1ItemStack)
getItemUseAction
in class Item
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
onItemRightClick
in class Item
public int getHealAmount()
public float getSaturationModifier()
public boolean isWolfsFavoriteMeat()
public ItemFood setPotionEffect(int par1, int par2, int par3, float par4)
public ItemFood setAlwaysEdible()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |