Class PotionEffect

java.lang.Object
net.minecraft.src.PotionEffect

public class PotionEffect extends Object
  • Constructor Details

    • 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 Details

    • 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()
    • 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)
      Toggle the isPotionDurationMax field.
    • getIsPotionDurationMax

      public boolean getIsPotionDurationMax()