net.minecraft.potion

## Class Potion

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

- Direct Known Subclasses:
    PotionHealth

      public class Potion
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Potion` | `blindness` The blindness Potion object.
    `static Potion` | `confusion`
    `static Potion` | `damageBoost`
    `static Potion` | `digSlowdown`
    `static Potion` | `digSpeed`
    `static Potion` | `field_76405_D`
    `static Potion` | `field_76406_E`
    `static Potion` | `field_76407_F`
    `static Potion` | `field_76408_G`
    `static Potion` | `field_76409_A`
    `static Potion` | `field_76410_B`
    `static Potion` | `field_76411_C`
    `static Potion` | `field_76423_b`
    `static Potion` | `field_76434_w`
    `static Potion` | `field_76442_z`
    `static Potion` | `field_76443_y`
    `static Potion` | `field_76444_x`
    `static Potion` | `fireResistance` The fire resistance Potion object.
    `static Potion` | `harm`
    `static Potion` | `heal`
    `static Potion` | `hunger` The hunger Potion object.
    `int` | `id` The Id of a Potion object.
    `static Potion` | `invisibility` The invisibility Potion object.
    `static Potion` | `jump`
    `static Potion` | `moveSlowdown`
    `static Potion` | `moveSpeed`
    `static Potion` | `nightVision` The night vision Potion object.
    `static Potion` | `poison` The poison Potion object.
    `static Potion[]` | `potionTypes` The array of potion types.
    `static Potion` | `regeneration` The regeneration Potion object.
    `static Potion` | `resistance`
    `static Potion` | `waterBreathing` The water breathing Potion object.
    `static Potion` | `weakness` The weakness Potion object.
    `static Potion` | `wither` The wither Potion object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `affectEntity(EntityLiving par1EntityLiving, EntityLiving par2EntityLiving, int par3, double par4)` Hits the provided entity with this potion's instant effect.
    `static String` | `getDurationString(PotionEffect par0PotionEffect)`
    `double` | `getEffectiveness()`
    `int` | `getId()` returns the ID of the potion
    `int` | `getLiquidColor()` Returns the color of the potion liquid.
    `String` | `getName()` returns the name of the potion
    `int` | `getStatusIconIndex()`
    `boolean` | `hasStatusIcon()`
    `boolean` | `isBadEffect()`
    `boolean` | `isInstant()` Returns true if the potion has an instant effect instead of a continuous one (eg Harming)
    `boolean` | `isReady(int par1, int par2)` checks if Potion effect is ready to be applied this tick.
    `boolean` | `isUsable()`
    `void` | `performEffect(EntityLiving par1EntityLiving, int par2)`
    `Potion` | `setIconIndex(int par1, int par2)` Sets the index for the icon displayed in the player's inventory when the status is active.
    `Potion` | `setPotionName(String par1Str)` Set the potion name.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### potionTypes

          public static final Potion[] potionTypes

      The array of potion types.

    - #### field_76423_b

          public static final Potion field_76423_b

    - #### moveSpeed

          public static final Potion moveSpeed

    - #### moveSlowdown

          public static final Potion moveSlowdown

    - #### digSpeed

          public static final Potion digSpeed

    - #### digSlowdown

          public static final Potion digSlowdown

    - #### damageBoost

          public static final Potion damageBoost

    - #### heal

          public static final Potion heal

    - #### harm

          public static final Potion harm

    - #### jump

          public static final Potion jump

    - #### confusion

          public static final Potion confusion

    - #### regeneration

          public static final Potion regeneration

      The regeneration Potion object.

    - #### resistance

          public static final Potion resistance

    - #### fireResistance

          public static final Potion fireResistance

      The fire resistance Potion object.

    - #### waterBreathing

          public static final Potion waterBreathing

      The water breathing Potion object.

    - #### invisibility

          public static final Potion invisibility

      The invisibility Potion object.

    - #### blindness

          public static final Potion blindness

      The blindness Potion object.

    - #### nightVision

          public static final Potion nightVision

      The night vision Potion object.

    - #### hunger

          public static final Potion hunger

      The hunger Potion object.

    - #### weakness

          public static final Potion weakness

      The weakness Potion object.

    - #### poison

          public static final Potion poison

      The poison Potion object.

    - #### wither

          public static final Potion wither

      The wither Potion object.

    - #### field_76434_w

          public static final Potion field_76434_w

    - #### field_76444_x

          public static final Potion field_76444_x

    - #### field_76443_y

          public static final Potion field_76443_y

    - #### field_76442_z

          public static final Potion field_76442_z

    - #### field_76409_A

          public static final Potion field_76409_A

    - #### field_76410_B

          public static final Potion field_76410_B

    - #### field_76411_C

          public static final Potion field_76411_C

    - #### field_76405_D

          public static final Potion field_76405_D

    - #### field_76406_E

          public static final Potion field_76406_E

    - #### field_76407_F

          public static final Potion field_76407_F

    - #### field_76408_G

          public static final Potion field_76408_G

    - #### id

          public final int id

      The Id of a Potion object.

  - ### Method Detail

    - #### setIconIndex

          public Potion setIconIndex(int par1,
                            int par2)

      Sets the index for the icon displayed in the player's inventory when the status is active.

    - #### getId

          public int getId()

      returns the ID of the potion

    - #### performEffect

          public void performEffect(EntityLiving par1EntityLiving,
                           int par2)

    - #### affectEntity

          public void affectEntity(EntityLiving par1EntityLiving,
                          EntityLiving par2EntityLiving,
                          int par3,
                          double par4)

      Hits the provided entity with this potion's instant effect.

    - #### isInstant

          public boolean isInstant()

      Returns true if the potion has an instant effect instead of a continuous one (eg Harming)

    - #### isReady

          public boolean isReady(int par1,
                        int par2)

      checks if Potion effect is ready to be applied this tick.

    - #### setPotionName

          public Potion setPotionName(String par1Str)

      Set the potion name.

    - #### getName

          public String getName()

      returns the name of the potion

    - #### hasStatusIcon

          public boolean hasStatusIcon()

    - #### getStatusIconIndex

          public int getStatusIconIndex()

    - #### isBadEffect

          public boolean isBadEffect()

    - #### getDurationString

          public static String getDurationString(PotionEffect par0PotionEffect)

    - #### getEffectiveness

          public double getEffectiveness()

    - #### isUsable

          public boolean isUsable()

    - #### getLiquidColor

          public int getLiquidColor()

      Returns the color of the potion liquid.