Package net.minecraft.src
Class ItemPotion
java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemPotion
- Direct Known Subclasses:
BandageItem
-
Field Summary
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 TypeMethodDescriptionvoidaddInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) allows items to add custom lines of information to the mouseover descriptionstatic Iconfunc_94589_d(String par0Str) intgetColorFromDamage(int par1) intgetColorFromItemStack(ItemStack par1ItemStack, int par2) getEffects(int par1) Returns a list of effects for the specified potion damage value.getEffects(ItemStack par1ItemStack) Returns a list of potion effects for the specified itemstack.getIconFromDamage(int par1) Gets an icon index based on an item's damage valuegetIconFromDamageForRenderPass(int par1, int par2) Gets an icon index based on an item's damage value and the given render passgetItemDisplayName(ItemStack par1ItemStack) getItemUseAction(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 itemvoidgetSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) returns a list of items with the same ID, but different meta (eg: dye returns 16 items)booleanbooleanisEffectInstant(int par1) booleanstatic booleanisSplash(int par0) returns wether or not a potion is a throwable splash potion based on damage valueonEaten(ItemStack itemStack, World world, EntityPlayer player) onItemRightClick(ItemStack stack, World world, EntityPlayer player) // +++START EDIT+++ // ---END EDIT--- Called whenever this item is equipped and the right mouse button is pressed.booleanonItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) Callback for item usage.booleanonItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing) This method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise.voidonUsedInCrafting(EntityPlayer player, ItemStack outputStack) voidregisterIcons(IconRegister par1IconRegister) booleanMethods inherited from class net.minecraft.src.Item
canHarvestBlock, canItemBeUsedByPlayer, canItemEditBlocks, createItemAsEntityInWorld, doesConsumeContainerItemWhenCrafted, doesContainerItemLeaveCraftingGrid, doZombiesConsume, getAnimationIcon, getBuoyancy, getCampfireBurnTime, getCanBeFedDirectlyIntoBrickOven, getCanBeFedDirectlyIntoCampfire, getCanItemBeSetOnFireOnUse, getCanItemStartFireOnUse, getChickenFoodValue, getContainerItem, getCreativeTab, getCustomItemEntity, getExhaustionOnUsedToHarvestBlock, getFurnaceBurnTime, getHasSubtypes, getHerbivoreFoodValue, getHopperFilterIcon, getIconIndex, getIconString, getInfernalMaxEnchantmentCost, getInfernalMaxNumEnchants, getIsRepairable, getItemAttributeModifiers, getItemEnchantability, getItemRightClickCooldown, getItemStackDisplayName, getItemStackLimit, getItemUseWarmupDuration, getMaxDamage, getMetadata, getModId, getMovingObjectPositionFromPlayer, getPigFoodValue, getPotionEffect, getRarity, getShareTag, getSpriteNumber, getStatName, getStrVsBlock, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, getWolfHealAmount, hasContainerItem, hasCustomItemEntity, hideFromEMI, hitEntity, ignoreDamageWhenComparingDuringUse, initializeStackOnGiveCommand, isConsumedInCrafting, isDamageable, isDamagedInCrafting, isEfficientVsBlock, isEnchantmentApplicable, isFull3D, isIncineratedInCrucible, isItemTool, isMap, isPotionIngredient, isWolfFood, itemInteractionForEntity, onBlockDestroyed, onBrokenInCrafting, onCreated, onDamagedInCrafting, onPlayerStoppedUsing, onUpdate, onUsedInCrafting, 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
-
Constructor Details
-
ItemPotion
public ItemPotion(int par1)
-
-
Method Details
-
onUsedInCrafting
- Overrides:
onUsedInCraftingin classItem
-
getEffects
Returns a list of potion effects for the specified itemstack. -
getEffects
Returns a list of effects for the specified potion damage value. -
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
Description copied from class:Item// +++START EDIT+++ // ---END EDIT--- Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer- Overrides:
onItemRightClickin classItem
-
onItemUse
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) Callback for item usage. If the item does something special on right clicking, he will have one of those. Return True if something happen and false if it don't. This is for ITEMS, not BLOCKS -
getIconFromDamage
Gets an icon index based on an item's damage value- Overrides:
getIconFromDamagein classItem
-
getIconFromDamageForRenderPass
Gets an icon index based on an item's damage value and the given render pass- Overrides:
getIconFromDamageForRenderPassin classItem
-
isSplash
public static boolean isSplash(int par0) returns wether or not a potion is a throwable splash potion based on damage value -
getColorFromDamage
public int getColorFromDamage(int par1) -
getColorFromItemStack
- Overrides:
getColorFromItemStackin classItem
-
requiresMultipleRenderPasses
public boolean requiresMultipleRenderPasses()- Overrides:
requiresMultipleRenderPassesin classItem
-
isEffectInstant
public boolean isEffectInstant(int par1) -
getItemDisplayName
- Overrides:
getItemDisplayNamein classItem
-
addInformation
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) allows items to add custom lines of information to the mouseover description- Overrides:
addInformationin classItem
-
hasEffect
-
getSubItems
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)- Overrides:
getSubItemsin classItem
-
onEaten
-
isMultiUsePerClick
public boolean isMultiUsePerClick()- Overrides:
isMultiUsePerClickin classItem
-
onItemUsedByBlockDispenser
public boolean onItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing) Description copied from class:ItemThis method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise. Co-ordinates specify the BD position.- Overrides:
onItemUsedByBlockDispenserin classItem
-
registerIcons
- Overrides:
registerIconsin classItem
-
func_94589_d
-