Class ItemPotion

java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemPotion
Direct Known Subclasses:
BandageItem

public class ItemPotion extends Item
  • Constructor Details

    • ItemPotion

      public ItemPotion(int par1)
  • Method Details

    • onUsedInCrafting

      public void onUsedInCrafting(EntityPlayer player, ItemStack outputStack)
      Overrides:
      onUsedInCrafting in class Item
    • getEffects

      public List getEffects(ItemStack par1ItemStack)
      Returns a list of potion effects for the specified itemstack.
    • getEffects

      public List getEffects(int par1)
      Returns a list of effects for the specified potion damage value.
    • getMaxItemUseDuration

      public int getMaxItemUseDuration(ItemStack par1ItemStack)
      How long it takes to use or consume an item
      Overrides:
      getMaxItemUseDuration in class Item
    • getItemUseAction

      public EnumAction getItemUseAction(ItemStack par1ItemStack)
      returns the action that specifies what animation to play when the items is being used
      Overrides:
      getItemUseAction in class Item
    • onItemRightClick

      public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
      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:
      onItemRightClick in class Item
    • 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
      Overrides:
      onItemUse in class Item
    • getIconFromDamage

      public Icon getIconFromDamage(int par1)
      Gets an icon index based on an item's damage value
      Overrides:
      getIconFromDamage in class Item
    • getIconFromDamageForRenderPass

      public Icon getIconFromDamageForRenderPass(int par1, int par2)
      Gets an icon index based on an item's damage value and the given render pass
      Overrides:
      getIconFromDamageForRenderPass in class Item
    • 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

      public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
      Overrides:
      getColorFromItemStack in class Item
    • requiresMultipleRenderPasses

      public boolean requiresMultipleRenderPasses()
      Overrides:
      requiresMultipleRenderPasses in class Item
    • isEffectInstant

      public boolean isEffectInstant(int par1)
    • getItemDisplayName

      public String getItemDisplayName(ItemStack par1ItemStack)
      Overrides:
      getItemDisplayName in class Item
    • 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:
      addInformation in class Item
    • hasEffect

      public boolean hasEffect(ItemStack par1ItemStack)
      Overrides:
      hasEffect in class Item
    • getSubItems

      public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
      returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
      Overrides:
      getSubItems in class Item
    • onEaten

      public ItemStack onEaten(ItemStack itemStack, World world, EntityPlayer player)
      Overrides:
      onEaten in class Item
    • isMultiUsePerClick

      public boolean isMultiUsePerClick()
      Overrides:
      isMultiUsePerClick in class Item
    • onItemUsedByBlockDispenser

      public boolean onItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing)
      Description copied from class: Item
      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. Co-ordinates specify the BD position.
      Overrides:
      onItemUsedByBlockDispenser in class Item
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      Overrides:
      registerIcons in class Item
    • func_94589_d

      public static Icon func_94589_d(String par0Str)