public class ItemPotion extends Item
Item.ToolMaterialbFull3D, canRepair, delegate, hasSubtypes, itemModifierUUID, itemRand, itemRegistry, maxStackSize| Constructor and Description |
|---|
ItemPotion() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(ItemStack stack,
EntityPlayer playerIn,
java.util.List<java.lang.String> tooltip,
boolean advanced)
allows items to add custom lines of information to the mouseover description
|
int |
getColorFromDamage(int meta) |
int |
getColorFromItemStack(ItemStack stack,
int renderPass) |
java.util.List<PotionEffect> |
getEffects(int meta) |
java.util.List<PotionEffect> |
getEffects(ItemStack stack) |
java.lang.String |
getItemStackDisplayName(ItemStack stack) |
EnumAction |
getItemUseAction(ItemStack stack)
returns the action that specifies what animation to play when the items is being used
|
int |
getMaxItemUseDuration(ItemStack stack)
How long it takes to use or consume an item
|
void |
getSubItems(Item itemIn,
CreativeTabs tab,
java.util.List<ItemStack> subItems)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
boolean |
hasEffect(ItemStack stack) |
boolean |
isEffectInstant(int meta) |
static boolean |
isSplash(int meta)
returns wether or not a potion is a throwable splash potion based on damage value
|
ItemStack |
onItemRightClick(ItemStack itemStackIn,
World worldIn,
EntityPlayer playerIn)
Called whenever this item is equipped and the right mouse button is pressed.
|
ItemStack |
onItemUseFinish(ItemStack stack,
World worldIn,
EntityPlayer playerIn)
Called when the player finishes using this Item (E.g. finishes eating.).
|
canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getArmorModel, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getChestGenBase, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDigSpeed, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackLimit, getItemStackLimit, getMaxDamage, getMaxDamage, getMetadata, getMetadata, getModel, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRegistryName, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setRegistryName, setRegistryName, setRegistryName, setUnlocalizedName, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTpublic java.util.List<PotionEffect> getEffects(ItemStack stack)
public java.util.List<PotionEffect> getEffects(int meta)
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityPlayer playerIn)
onItemUseFinish in class Itempublic int getMaxItemUseDuration(ItemStack stack)
getMaxItemUseDuration in class Itempublic EnumAction getItemUseAction(ItemStack stack)
getItemUseAction in class Itempublic ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn)
onItemRightClick in class Itempublic static boolean isSplash(int meta)
public int getColorFromDamage(int meta)
public int getColorFromItemStack(ItemStack stack, int renderPass)
getColorFromItemStack in class Itempublic java.lang.String getItemStackDisplayName(ItemStack stack)
getItemStackDisplayName in class Itempublic boolean isEffectInstant(int meta)
public void addInformation(ItemStack stack, EntityPlayer playerIn, java.util.List<java.lang.String> tooltip, boolean advanced)
addInformation in class Itempublic void getSubItems(Item itemIn, CreativeTabs tab, java.util.List<ItemStack> subItems)
getSubItems in class Item