Package net.minecraft.src
Class ItemFood
java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemFood
- Direct Known Subclasses:
CookedMysteryMeatItem,CookedWolfChopItem,FoodItem,HardBoiledEggItem,ItemAppleGold,ItemSeedFood,ItemSoup,MushroomSoupItem,SeedFoodItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intNumber of ticks to run while 'EnumAction'ing until result.Fields inherited from class net.minecraft.src.Item
appleGold, appleRed, arrow, axeDiamond, axeGold, axeIron, axeStone, axeWood, bakedPotato, BASE_CHICKEN_ITEM_FOOD_VALUE, BASE_HERBIVORE_ITEM_FOOD_VALUE, BASE_PIG_ITEM_FOOD_VALUE, bed, beefCooked, beefRaw, bFull3D, blazePowder, blazeRod, boat, bone, book, bootsChain, bootsDiamond, bootsGold, bootsIron, bootsLeather, bow, bowlEmpty, bowlSoup, bread, brewingStand, brick, bucketEmpty, bucketLava, bucketMilk, bucketWater, cake, carrot, carrotOnAStick, cauldron, chickenCooked, chickenRaw, clay, coal, comparator, compass, cookie, defaultFurnaceBurnTime, diamond, doorIron, doorWood, dyePowder, egg, emerald, emptyMap, enchantedBook, enderPearl, expBottle, eyeOfEnder, feather, fermentedSpiderEye, field_111210_e, FILTERABLE_FINE, FILTERABLE_NARROW, FILTERABLE_NO_PROPERTIES, FILTERABLE_SMALL, FILTERABLE_SOLID_BLOCK, FILTERABLE_THIN, fireballCharge, firework, fireworkCharge, fishCooked, fishingRod, fishRaw, flint, flintAndSteel, flowerPot, ghastTear, glassBottle, glowstone, goldenCarrot, goldNugget, gunpowder, hasSubtypes, helmetChain, helmetDiamond, helmetGold, helmetIron, helmetLeather, hoeDiamond, hoeGold, hoeIron, hoeStone, hoeWood, horseArmorDiamond, horseArmorGold, horseArmorIron, iconString, ingotGold, ingotIron, isInceratedInCrucible, itemFrame, itemIcon, itemID, itemRand, itemsList, leash, leather, legsChain, legsDiamond, legsGold, legsIron, legsLeather, magmaCream, map, maxStackSize, melon, melonSeeds, minecartCrate, minecartEmpty, minecartHopper, minecartPowered, minecartTnt, modID, modIDSetter, monsterPlacer, nameTag, netherQuartz, netherrackBrick, netherStalkSeeds, netherStar, painting, paper, pickaxeDiamond, pickaxeGold, pickaxeIron, pickaxeStone, pickaxeWood, plateChain, plateDiamond, plateGold, plateIron, plateLeather, pocketSundial, poisonousPotato, porkCooked, porkRaw, potato, potion, pumpkinPie, pumpkinSeeds, record11, record13, recordBlocks, recordCat, recordChirp, recordFar, recordMall, recordMellohi, recordStal, recordStrad, recordWait, recordWard, redstone, redstoneRepeater, reed, rottenFlesh, saddle, seeds, shears, shovelDiamond, shovelGold, shovelIron, shovelStone, shovelWood, sign, silk, skull, slimeBall, snowball, speckledMelon, spiderEye, stick, sugar, suppressConflictWarnings, swordDiamond, swordGold, swordIron, swordStone, swordWood, wheat, writableBook, writtenBook -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintgetItemUseAction(ItemStack par1ItemStack) returns the action that specifies what animation to play when the items is being usedintgetMaxItemUseDuration(ItemStack par1ItemStack) How long it takes to use or consume an itemfloatgets the saturationModifier of the ItemFoodintbooleanbooleanbooleanWhether wolves like this food (true for raw and cooked porkchop).onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) protected voidonFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) Called whenever this item is equipped and the right mouse button is pressed.Set the field 'alwaysEdible' to true, and make the food edible even if the player don't need to eat.setPotionEffect(int par1, int par2, int par3, float par4) sets a potion effect on the item.Methods inherited from class net.minecraft.src.Item
addInformation, canHarvestBlock, canItemBeUsedByPlayer, canItemEditBlocks, createItemAsEntityInWorld, doesConsumeContainerItemWhenCrafted, doesContainerItemLeaveCraftingGrid, getAnimationIcon, getBuoyancy, getCampfireBurnTime, getCanBeFedDirectlyIntoBrickOven, getCanBeFedDirectlyIntoCampfire, getCanItemBeSetOnFireOnUse, getCanItemStartFireOnUse, getChickenFoodValue, getColorFromItemStack, getContainerItem, getCreativeTab, getCustomItemEntity, getExhaustionOnUsedToHarvestBlock, getFurnaceBurnTime, getHasSubtypes, getHerbivoreFoodValue, getHopperFilterIcon, getIconFromDamage, getIconFromDamageForRenderPass, getIconIndex, getIconString, getInfernalMaxEnchantmentCost, getInfernalMaxNumEnchants, getIsRepairable, getItemAttributeModifiers, getItemDisplayName, getItemEnchantability, getItemRightClickCooldown, getItemStackDisplayName, getItemStackLimit, getItemUseWarmupDuration, getMaxDamage, getMetadata, getModId, getMovingObjectPositionFromPlayer, getPigFoodValue, getPotionEffect, getRarity, getShareTag, getSpriteNumber, getStatName, getStrVsBlock, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasCustomItemEntity, hasEffect, hideFromEMI, hitEntity, ignoreDamageWhenComparingDuringUse, initializeStackOnGiveCommand, isConsumedInCrafting, isDamageable, isDamagedInCrafting, isEfficientVsBlock, isEnchantmentApplicable, isFull3D, isIncineratedInCrucible, isItemTool, isMap, isPotionIngredient, itemInteractionForEntity, onBlockDestroyed, onBrokenInCrafting, onCreated, onDamagedInCrafting, onItemUse, onItemUsedByBlockDispenser, onPlayerStoppedUsing, onUpdate, onUsedInCrafting, onUsedInCrafting, registerIcons, requiresMultipleRenderPasses, setAllAxesToBeEffectiveVsBlock, setAllPicksToBeEffectiveVsBlock, setAllShovelsToBeEffectiveVsBlock, setAsBasicChickenFood, setAsBasicHerbivoreFood, setAsBasicPigFood, setBuoyancy, setBuoyant, setChickenFoodValue, setContainerItem, setCreativeTab, setCustomItemEntity, setFull3D, setfurnaceburntime, setfurnaceburntime, setHasSubtypes, setHerbivoreFoodValue, setIncineratedInCrucible, setInfernalMaxEnchantmentCost, setInfernalMaxNumEnchants, setItemRightClickCooldown, setMaxDamage, setMaxStackSize, setModID, setNeutralBuoyant, setNonBuoyant, setNotIncineratedInCrucible, setPigFoodValue, setPotionEffect, setTextureName, setUnlocalizedName, shouldApplyAttributesWhenHeld, shouldApplyAttributesWhenWorn, shouldRotateAroundWhenRendering, updateUsingItem
-
Field Details
-
itemUseDuration
public final int itemUseDurationNumber of ticks to run while 'EnumAction'ing until result.
-
-
Constructor Details
-
ItemFood
public ItemFood(int par1, int par2, float par3, boolean par4) -
ItemFood
public ItemFood(int par1, int par2, boolean par3) -
ItemFood
public ItemFood(int iItemID, int iHealAmount, float fSaturationModifier, boolean bWolfsFavoriteMeat, boolean bZombiesConsume)
-
-
Method Details
-
onEaten
-
onFoodEaten
-
getMaxItemUseDuration
How long it takes to use or consume an item- Overrides:
getMaxItemUseDurationin classItem
-
getItemUseAction
returns the action that specifies what animation to play when the items is being used- Overrides:
getItemUseActionin classItem
-
onItemRightClick
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer- Overrides:
onItemRightClickin classItem
-
getHealAmount
public int getHealAmount() -
getSaturationModifier
public float getSaturationModifier()gets the saturationModifier of the ItemFood -
isWolfsFavoriteMeat
public boolean isWolfsFavoriteMeat()Whether wolves like this food (true for raw and cooked porkchop). -
setPotionEffect
sets a potion effect on the item. Args: int potionId, int duration (will be multiplied by 20), int amplifier, float probability of effect happening -
setAlwaysEdible
Set the field 'alwaysEdible' to true, and make the food edible even if the player don't need to eat. -
doZombiesConsume
public boolean doZombiesConsume()- Overrides:
doZombiesConsumein classItem
-
isMultiUsePerClick
public boolean isMultiUsePerClick()- Overrides:
isMultiUsePerClickin classItem
-
isWolfFood
public boolean isWolfFood()- Overrides:
isWolfFoodin classItem
-
getWolfHealAmount
public int getWolfHealAmount()- Overrides:
getWolfHealAmountin classItem
-
getHungerRestored
public int getHungerRestored()
-