net.minecraft.potion

## Class PotionEffect

- java.lang.Object
- - net.minecraft.potion.PotionEffect

-     public class PotionEffect
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `duration` The duration of the potion effect

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PotionEffect(int par1, int par2)`
    `PotionEffect(int par1, int par2, int par3)`
    `PotionEffect(int par1, int par2, int par3, boolean par4)`
    `PotionEffect(PotionEffect par1PotionEffect)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCurativeItem(ItemStack stack)` Adds the given stack to list of curative items for the potion effect
    `void` | `combine(PotionEffect par1PotionEffect)` merges the input PotionEffect into this one if this.amplifier <= tomerge.amplifier.
    `boolean` | `equals(Object par1Obj)`
    `int` | `getAmplifier()`
    `List<ItemStack>` | `getCurativeItems()` Returns a list of curative items for the potion effect
    `int` | `getDuration()`
    `String` | `getEffectName()`
    `boolean` | `getIsAmbient()` Gets whether this potion effect originated from a beacon
    `boolean` | `getIsPotionDurationMax()`
    `int` | `getPotionID()` Retrieve the ID of the potion this effect matches.
    `int` | `hashCode()`
    `boolean` | `isCurativeItem(ItemStack stack)` Checks the given ItemStack to see if it is in the list of curative items for the potion effect
    `boolean` | `onUpdate(EntityLivingBase par1EntityLivingBase)`
    `void` | `performEffect(EntityLivingBase par1EntityLivingBase)`
    `static PotionEffect` | `readCustomPotionEffectFromNBT(NBTTagCompound par0NBTTagCompound)` Read a custom potion effect from a potion item's NBT data.
    `void` | `setCurativeItems(List<ItemStack> curativeItems)` Sets the array of curative items for the potion effect
    `void` | `setPotionDurationMax(boolean par1)`
    `void` | `setSplashPotion(boolean par1)` Set whether this potion is a splash potion.
    `String` | `toString()`
    `NBTTagCompound` | `writeCustomPotionEffectToNBT(NBTTagCompound par1NBTTagCompound)` Write a custom potion effect to a potion item's NBT data.

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### duration

          public int duration

      The duration of the potion effect

  - ### Constructor Detail

    - #### PotionEffect

          public PotionEffect(int par1,
                      int par2)

    - #### PotionEffect

          public PotionEffect(int par1,
                      int par2,
                      int par3)

    - #### PotionEffect

          public PotionEffect(int par1,
                      int par2,
                      int par3,
                      boolean par4)

    - #### PotionEffect

          public PotionEffect(PotionEffect par1PotionEffect)

  - ### Method Detail

    - #### combine

          public void combine(PotionEffect par1PotionEffect)

      merges the input PotionEffect into this one if this.amplifier <= tomerge.amplifier. The duration in the supplied potion effect is assumed to be greater.

    - #### getPotionID

          public int getPotionID()

      Retrieve the ID of the potion this effect matches.

    - #### getDuration

          public int getDuration()

    - #### getAmplifier

          public int getAmplifier()

    - #### getCurativeItems

          public List<ItemStack> getCurativeItems()

      Returns a list of curative items for the potion effect
      Returns:
        The list (ItemStack) of curative items for the potion effect

    - #### isCurativeItem

          public boolean isCurativeItem(ItemStack stack)

      Checks the given ItemStack to see if it is in the list of curative items for the potion effect
      Parameters:
        `stack` - The ItemStack being checked against the list of curative items for the potion effect
      Returns:
        true if the given ItemStack is in the list of curative items for the potion effect, false otherwise

    - #### setCurativeItems

          public void setCurativeItems(List<ItemStack> curativeItems)

      Sets the array of curative items for the potion effect
      Parameters:
        `curativeItems` - The list of ItemStacks being set to the potion effect

    - #### addCurativeItem

          public void addCurativeItem(ItemStack stack)

      Adds the given stack to list of curative items for the potion effect
      Parameters:
        `stack` - The ItemStack being added to the curative item list

    - #### setSplashPotion

          public void setSplashPotion(boolean par1)

      Set whether this potion is a splash potion.

    - #### getIsAmbient

          public boolean getIsAmbient()

      Gets whether this potion effect originated from a beacon

    - #### onUpdate

          public boolean onUpdate(EntityLivingBase par1EntityLivingBase)

    - #### performEffect

          public void performEffect(EntityLivingBase par1EntityLivingBase)

    - #### getEffectName

          public String getEffectName()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object par1Obj)

      Overrides:
        `equals` in class `Object`

    - #### writeCustomPotionEffectToNBT

          public NBTTagCompound writeCustomPotionEffectToNBT(NBTTagCompound par1NBTTagCompound)

      Write a custom potion effect to a potion item's NBT data.

    - #### readCustomPotionEffectFromNBT

          public static PotionEffect readCustomPotionEffectFromNBT(NBTTagCompound par0NBTTagCompound)

      Read a custom potion effect from a potion item's NBT data.

    - #### setPotionDurationMax

          public void setPotionDurationMax(boolean par1)

    - #### getIsPotionDurationMax

          public boolean getIsPotionDurationMax()