Package net.minecraft.potion
Class EffectInstance
java.lang.Object
net.minecraft.potion.EffectInstance
- All Implemented Interfaces:
Comparable<EffectInstance>
,IForgeEffectInstance
public class EffectInstance
extends Object
implements Comparable<EffectInstance>, IForgeEffectInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private int
private int
private final Effect
private EffectInstance
private static final org.apache.logging.log4j.Logger
private boolean
private boolean
private boolean
private boolean
-
Constructor Summary
ConstructorDescriptionEffectInstance
(Effect p_i46811_1_) EffectInstance
(EffectInstance p_i1577_1_) EffectInstance
(Effect p_i46812_1_, int p_i46812_2_) EffectInstance
(Effect p_i46813_1_, int p_i46813_2_, int p_i46813_3_) EffectInstance
(Effect p_i46814_1_, int p_i46814_2_, int p_i46814_3_, boolean p_i46814_4_, boolean p_i46814_5_) EffectInstance
(Effect p_i48980_1_, int p_i48980_2_, int p_i48980_3_, boolean p_i48980_4_, 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_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyEffect
(LivingEntity p_76457_1_) int
compareTo
(EffectInstance p_compareTo_1_) boolean
int
Returns a list of curative items for the potion effect By default, this list is initialized usingPotion#getCurativeItems
int
int
hashCode()
boolean
boolean
boolean
static EffectInstance
load
(CompoundNBT p_82722_0_) private static EffectInstance
loadSpecifiedEffect
(Effect p_230116_0_, CompoundNBT p_230116_1_) private static EffectInstance
readCurativeItems
(EffectInstance effect, CompoundNBT nbt) save
(CompoundNBT p_82719_1_) void
setCurativeItems
(List<ItemStack> curativeItems) Sets the list of curative items for this potion effect, overwriting any already present(package private) void
setDetailsFrom
(EffectInstance p_230117_1_) void
setNoCounter
(boolean p_100012_1_) boolean
showIcon()
boolean
tick
(LivingEntity p_76455_1_, Runnable p_76455_2_) private int
toString()
boolean
update
(EffectInstance p_199308_1_) private void
writeDetailsTo
(CompoundNBT p_230119_1_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEffectInstance
addCurativeItem, getEffectInstance, isCurativeItem, renderHUDEffect, renderInventoryEffect, shouldRender, shouldRenderHUD, shouldRenderInvText, writeCurativeItems
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
effect
-
duration
private int duration -
amplifier
private int amplifier -
splash
private boolean splash -
ambient
private boolean ambient -
noCounter
private boolean noCounter -
visible
private boolean visible -
showIcon
private boolean showIcon -
curativeItems
-
-
Constructor Details
-
EffectInstance
-
EffectInstance
-
EffectInstance
-
EffectInstance
public EffectInstance(Effect p_i46814_1_, int p_i46814_2_, int p_i46814_3_, boolean p_i46814_4_, boolean p_i46814_5_) -
EffectInstance
public EffectInstance(Effect p_i48980_1_, int p_i48980_2_, int p_i48980_3_, boolean p_i48980_4_, boolean p_i48980_5_, boolean p_i48980_6_) -
EffectInstance
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_) -
EffectInstance
-
-
Method Details
-
setDetailsFrom
-
update
-
getEffect
-
getDuration
public int getDuration() -
getAmplifier
public int getAmplifier() -
isAmbient
public boolean isAmbient() -
isVisible
public boolean isVisible() -
showIcon
public boolean showIcon() -
tick
-
tickDownDuration
private int tickDownDuration() -
applyEffect
-
getDescriptionId
-
toString
-
equals
-
hashCode
public int hashCode() -
save
-
writeDetailsTo
-
load
-
loadSpecifiedEffect
-
setNoCounter
public void setNoCounter(boolean p_100012_1_) -
isNoCounter
public boolean isNoCounter() -
compareTo
- Specified by:
compareTo
in interfaceComparable<EffectInstance>
-
getCurativeItems
Description copied from interface:IForgeEffectInstance
Returns a list of curative items for the potion effect By default, this list is initialized usingPotion#getCurativeItems
- Specified by:
getCurativeItems
in interfaceIForgeEffectInstance
- Returns:
- The list (ItemStack) of curative items for the potion effect
-
setCurativeItems
Description copied from interface:IForgeEffectInstance
Sets the list of curative items for this potion effect, overwriting any already present- Specified by:
setCurativeItems
in interfaceIForgeEffectInstance
- Parameters:
curativeItems
- The list of ItemStacks being set to the potion effect
-
readCurativeItems
-