Package net.minecraft.world.effect
Class MobEffectInstance
java.lang.Object
net.minecraft.world.effect.MobEffectInstance
- All Implemented Interfaces:
Comparable<MobEffectInstance>
,IForgeMobEffectInstance
public class MobEffectInstance
extends Object
implements Comparable<MobEffectInstance>, IForgeMobEffectInstance
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private int
private int
private MobEffect
private MobEffectInstance
private static org.apache.logging.log4j.Logger
private boolean
private boolean
private boolean
-
Constructor Summary
ConstructorDescriptionMobEffectInstance(MobEffect p_19513_)
MobEffectInstance(MobEffectInstance p_19543_)
MobEffectInstance(MobEffect p_19515_, int p_19516_)
MobEffectInstance(MobEffect p_19518_, int p_19519_, int p_19520_)
MobEffectInstance(MobEffect p_19522_, int p_19523_, int p_19524_, boolean p_19525_, boolean p_19526_)
MobEffectInstance(MobEffect p_19528_, int p_19529_, int p_19530_, boolean p_19531_, boolean p_19532_, boolean p_19533_)
MobEffectInstance(MobEffect p_19535_, int p_19536_, int p_19537_, boolean p_19538_, boolean p_19539_, boolean p_19540_, MobEffectInstance p_19541_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyEffect(LivingEntity p_19551_)
int
compareTo(MobEffectInstance p_19566_)
boolean
int
Returns a list of curative items for the potion effect By default, this list is initialized usingIForgeMobEffect.getCurativeItems()
int
int
hashCode()
boolean
boolean
boolean
static MobEffectInstance
load(CompoundTag p_19561_)
private static MobEffectInstance
loadSpecifiedEffect(MobEffect p_19546_, CompoundTag p_19547_)
private static MobEffectInstance
readCurativeItems(MobEffectInstance effect, CompoundTag nbt)
save(CompoundTag p_19556_)
void
setCurativeItems(List<ItemStack> curativeItems)
Sets the list of curative items for this potion effect, overwriting any already present(package private) void
setDetailsFrom(MobEffectInstance p_19549_)
void
setNoCounter(boolean p_19563_)
boolean
showIcon()
boolean
tick(LivingEntity p_19553_, Runnable p_19554_)
private int
toString()
boolean
update(MobEffectInstance p_19559_)
private void
writeDetailsTo(CompoundTag p_19568_)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeMobEffectInstance
addCurativeItem, isCurativeItem, writeCurativeItems
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
effect
-
duration
private int duration -
amplifier
private int amplifier -
ambient
private boolean ambient -
noCounter
private boolean noCounter -
visible
private boolean visible -
showIcon
private boolean showIcon -
curativeItems
-
-
Constructor Details
-
MobEffectInstance
-
MobEffectInstance
-
MobEffectInstance
-
MobEffectInstance
public MobEffectInstance(MobEffect p_19522_, int p_19523_, int p_19524_, boolean p_19525_, boolean p_19526_) -
MobEffectInstance
public MobEffectInstance(MobEffect p_19528_, int p_19529_, int p_19530_, boolean p_19531_, boolean p_19532_, boolean p_19533_) -
MobEffectInstance
public MobEffectInstance(MobEffect p_19535_, int p_19536_, int p_19537_, boolean p_19538_, boolean p_19539_, boolean p_19540_, @Nullable MobEffectInstance p_19541_) -
MobEffectInstance
-
-
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_19563_) -
isNoCounter
public boolean isNoCounter() -
compareTo
- Specified by:
compareTo
in interfaceComparable<MobEffectInstance>
-
getCurativeItems
Description copied from interface:IForgeMobEffectInstance
Returns a list of curative items for the potion effect By default, this list is initialized usingIForgeMobEffect.getCurativeItems()
- Specified by:
getCurativeItems
in interfaceIForgeMobEffectInstance
- Returns:
- The list (ItemStack) of curative items for the potion effect
-
setCurativeItems
Description copied from interface:IForgeMobEffectInstance
Sets the list of curative items for this potion effect, overwriting any already present- Specified by:
setCurativeItems
in interfaceIForgeMobEffectInstance
- Parameters:
curativeItems
- The list of ItemStacks being set to the potion effect
-
readCurativeItems
-