public class PotionEffect extends java.lang.Object implements java.lang.Comparable<PotionEffect>
Constructor and Description |
---|
PotionEffect(Potion potionIn) |
PotionEffect(PotionEffect other) |
PotionEffect(Potion potionIn,
int durationIn) |
PotionEffect(Potion potionIn,
int durationIn,
int amplifierIn) |
PotionEffect(Potion potionIn,
int durationIn,
int amplifierIn,
boolean ambientIn,
boolean showParticlesIn) |
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 other) |
int |
compareTo(PotionEffect p_compareTo_1_) |
boolean |
doesShowParticles() |
boolean |
equals(java.lang.Object p_equals_1_) |
int |
getAmplifier() |
java.util.List<ItemStack> |
getCurativeItems()
Returns a list of curative items for the potion effect
|
int |
getDuration() |
java.lang.String |
getEffectName() |
boolean |
getIsAmbient() |
boolean |
getIsPotionDurationMax() |
Potion |
getPotion() |
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 entityIn) |
void |
performEffect(EntityLivingBase entityIn) |
static PotionEffect |
readCustomPotionEffectFromNBT(NBTTagCompound nbt) |
void |
setCurativeItems(java.util.List<ItemStack> curativeItems)
Sets the array of curative items for the potion effect
|
void |
setPotionDurationMax(boolean maxDuration) |
java.lang.String |
toString() |
NBTTagCompound |
writeCustomPotionEffectToNBT(NBTTagCompound nbt) |
public PotionEffect(Potion potionIn)
public PotionEffect(Potion potionIn, int durationIn)
public PotionEffect(Potion potionIn, int durationIn, int amplifierIn)
public PotionEffect(Potion potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticlesIn)
public PotionEffect(PotionEffect other)
public void combine(PotionEffect other)
public Potion getPotion()
public int getDuration()
public int getAmplifier()
public boolean getIsAmbient()
public boolean doesShowParticles()
public boolean onUpdate(EntityLivingBase entityIn)
public void performEffect(EntityLivingBase entityIn)
public java.lang.String getEffectName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object p_equals_1_)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public NBTTagCompound writeCustomPotionEffectToNBT(NBTTagCompound nbt)
public static PotionEffect readCustomPotionEffectFromNBT(NBTTagCompound nbt)
public void setPotionDurationMax(boolean maxDuration)
public int compareTo(PotionEffect p_compareTo_1_)
compareTo
in interface java.lang.Comparable<PotionEffect>
public boolean getIsPotionDurationMax()
public java.util.List<ItemStack> getCurativeItems()
public boolean isCurativeItem(ItemStack stack)
stack
- The ItemStack being checked against the list of curative items for the potion effectpublic void setCurativeItems(java.util.List<ItemStack> curativeItems)
curativeItems
- The list of ItemStacks being set to the potion effectpublic void addCurativeItem(ItemStack stack)
stack
- The ItemStack being added to the curative item list