public class ItemFood extends Item
Item.ToolMaterial
Modifier and Type | Field and Description |
---|---|
int |
itemUseDuration
Number of ticks to run while 'EnumAction'ing until result.
|
bFull3D, canRepair, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSize
Constructor and Description |
---|
ItemFood(int p_i45340_1_,
boolean p_i45340_2_) |
ItemFood(int p_i45339_1_,
float p_i45339_2_,
boolean p_i45339_3_) |
Modifier and Type | Method and Description |
---|---|
int |
func_150905_g(ItemStack p_150905_1_) |
float |
func_150906_h(ItemStack p_150906_1_) |
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
|
boolean |
isWolfsFavoriteMeat()
Whether wolves like this food (true for raw and cooked porkchop).
|
ItemStack |
onEaten(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer) |
protected void |
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.
|
addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150893_a, func_150897_b, getArmorModel, getArmorTexture, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDisplayDamage, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getIcon, getIcon, getIconFromDamage, getIconFromDamageForRenderPass, getIconIndex, getIconString, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getMaxDamage, getMaxDamage, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRenderPasses, getShareTag, getSmeltingExperience, getSpriteNumber, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hasEffect, hitEntity, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerIcons, registerItems, renderHelmetOverlay, requiresMultipleRenderPasses, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setTextureName, setUnlocalizedName, shouldRotateAroundWhenRendering
public final int itemUseDuration
public ItemFood(int p_i45339_1_, float p_i45339_2_, boolean p_i45339_3_)
public ItemFood(int p_i45340_1_, boolean p_i45340_2_)
public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
protected void onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
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 func_150905_g(ItemStack p_150905_1_)
public float func_150906_h(ItemStack p_150906_1_)
public boolean isWolfsFavoriteMeat()
public ItemFood setPotionEffect(int par1, int par2, int par3, float par4)
public ItemFood setAlwaysEdible()