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
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate intprivate MobEffectprivate MobEffectInstanceprivate static org.apache.logging.log4j.Loggerprivate booleanprivate booleanprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionMobEffectInstance(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 TypeMethodDescriptionvoidapplyEffect(LivingEntity p_19551_)intcompareTo(MobEffectInstance p_19566_)booleanintReturns a list of curative items for the potion effect By default, this list is initialized usingIForgeMobEffect.getCurativeItems()intinthashCode()booleanbooleanbooleanstatic MobEffectInstanceload(CompoundTag p_19561_)private static MobEffectInstanceloadSpecifiedEffect(MobEffect p_19546_, CompoundTag p_19547_)private static MobEffectInstancereadCurativeItems(MobEffectInstance effect, CompoundTag nbt)save(CompoundTag p_19556_)voidsetCurativeItems(List<ItemStack> curativeItems)Sets the list of curative items for this potion effect, overwriting any already present(package private) voidsetDetailsFrom(MobEffectInstance p_19549_)voidsetNoCounter(boolean p_19563_)booleanshowIcon()booleantick(LivingEntity p_19553_, Runnable p_19554_)private inttoString()booleanupdate(MobEffectInstance p_19559_)private voidwriteDetailsTo(CompoundTag p_19568_)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
compareToin interfaceComparable<MobEffectInstance>
-
getCurativeItems
Description copied from interface:IForgeMobEffectInstanceReturns a list of curative items for the potion effect By default, this list is initialized usingIForgeMobEffect.getCurativeItems()- Specified by:
getCurativeItemsin interfaceIForgeMobEffectInstance- Returns:
- The list (ItemStack) of curative items for the potion effect
-
setCurativeItems
Description copied from interface:IForgeMobEffectInstanceSets the list of curative items for this potion effect, overwriting any already present- Specified by:
setCurativeItemsin interfaceIForgeMobEffectInstance- Parameters:
curativeItems- The list of ItemStacks being set to the potion effect
-
readCurativeItems
-