public class EffectInstance extends java.lang.Object implements java.lang.Comparable<EffectInstance>, IForgeEffectInstance
Modifier and Type | Field and Description |
---|---|
private boolean |
ambient |
private int |
amplifier |
private java.util.List<ItemStack> |
curativeItems |
private int |
duration |
private EffectInstance |
field_230115_j_ |
private boolean |
isPotionDurationMax |
private boolean |
isSplashPotion |
private static org.apache.logging.log4j.Logger |
LOGGER |
private Effect |
potion |
private boolean |
showIcon |
private boolean |
showParticles |
Constructor and Description |
---|
EffectInstance(Effect potionIn) |
EffectInstance(EffectInstance other) |
EffectInstance(Effect potionIn,
int durationIn) |
EffectInstance(Effect potionIn,
int durationIn,
int amplifierIn) |
EffectInstance(Effect potionIn,
int durationIn,
int amplifierIn,
boolean ambientIn,
boolean showParticlesIn) |
EffectInstance(Effect potionIn,
int durationIn,
int amplifierIn,
boolean ambientIn,
boolean p_i48980_5_,
boolean p_i48980_6_) |
EffectInstance(Effect p_i230050_1_,
int p_i230050_2_,
int p_i230050_3_,
boolean p_i230050_4_,
boolean p_i230050_5_,
boolean p_i230050_6_,
EffectInstance p_i230050_7_) |
Modifier and Type | Method and Description |
---|---|
boolean |
combine(EffectInstance other) |
int |
compareTo(EffectInstance p_compareTo_1_) |
private int |
deincrementDuration() |
boolean |
doesShowParticles() |
boolean |
equals(java.lang.Object p_equals_1_) |
private static EffectInstance |
func_230116_a_(Effect p_230116_0_,
CompoundNBT p_230116_1_) |
(package private) void |
func_230117_a_(EffectInstance p_230117_1_) |
private void |
func_230119_c_(CompoundNBT p_230119_1_) |
int |
getAmplifier() |
java.util.List<ItemStack> |
getCurativeItems()
Returns a list of curative items for the potion effect
By default, this list is initialized using
Potion#getCurativeItems |
int |
getDuration() |
java.lang.String |
getEffectName() |
boolean |
getIsPotionDurationMax() |
Effect |
getPotion() |
int |
hashCode() |
boolean |
isAmbient() |
boolean |
isShowIcon() |
void |
performEffect(LivingEntity entityIn) |
static EffectInstance |
read(CompoundNBT nbt) |
private static EffectInstance |
readCurativeItems(EffectInstance effect,
CompoundNBT nbt) |
void |
setCurativeItems(java.util.List<ItemStack> curativeItems)
Sets the list of curative items for this potion effect, overwriting any already present
|
void |
setPotionDurationMax(boolean maxDuration) |
boolean |
tick(LivingEntity entityIn,
java.lang.Runnable p_76455_2_) |
java.lang.String |
toString() |
CompoundNBT |
write(CompoundNBT nbt) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addCurativeItem, getEffectInstance, isCurativeItem, renderHUDEffect, renderInventoryEffect, shouldRender, shouldRenderHUD, shouldRenderInvText, writeCurativeItems
private static final org.apache.logging.log4j.Logger LOGGER
private final Effect potion
private int duration
private int amplifier
private boolean isSplashPotion
private boolean ambient
private boolean isPotionDurationMax
private boolean showParticles
private boolean showIcon
@Nullable private EffectInstance field_230115_j_
private java.util.List<ItemStack> curativeItems
public EffectInstance(Effect potionIn)
public EffectInstance(Effect potionIn, int durationIn)
public EffectInstance(Effect potionIn, int durationIn, int amplifierIn)
public EffectInstance(Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticlesIn)
public EffectInstance(Effect potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean p_i48980_5_, boolean p_i48980_6_)
public EffectInstance(Effect p_i230050_1_, int p_i230050_2_, int p_i230050_3_, boolean p_i230050_4_, boolean p_i230050_5_, boolean p_i230050_6_, @Nullable EffectInstance p_i230050_7_)
public EffectInstance(EffectInstance other)
void func_230117_a_(EffectInstance p_230117_1_)
public boolean combine(EffectInstance other)
public Effect getPotion()
public int getDuration()
public int getAmplifier()
public boolean isAmbient()
public boolean doesShowParticles()
public boolean isShowIcon()
public boolean tick(LivingEntity entityIn, java.lang.Runnable p_76455_2_)
private int deincrementDuration()
public void performEffect(LivingEntity 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 CompoundNBT write(CompoundNBT nbt)
private void func_230119_c_(CompoundNBT p_230119_1_)
public static EffectInstance read(CompoundNBT nbt)
private static EffectInstance func_230116_a_(Effect p_230116_0_, CompoundNBT p_230116_1_)
public void setPotionDurationMax(boolean maxDuration)
public boolean getIsPotionDurationMax()
public int compareTo(EffectInstance p_compareTo_1_)
compareTo
in interface java.lang.Comparable<EffectInstance>
public java.util.List<ItemStack> getCurativeItems()
IForgeEffectInstance
Potion#getCurativeItems
getCurativeItems
in interface IForgeEffectInstance
public void setCurativeItems(java.util.List<ItemStack> curativeItems)
IForgeEffectInstance
setCurativeItems
in interface IForgeEffectInstance
curativeItems
- The list of ItemStacks being set to the potion effectprivate static EffectInstance readCurativeItems(EffectInstance effect, CompoundNBT nbt)