Package net.minecraft.world.effect
Class MobEffect
java.lang.Object
net.minecraft.world.effect.MobEffect
- All Implemented Interfaces:
IMobEffectExtension
- Direct Known Subclasses:
AbsorptionMobEffect
,BadOmenMobEffect
,HungerMobEffect
,InstantenousMobEffect
,PoisonMobEffect
,RegenerationMobEffect
,WitherMobEffect
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<Attribute,
AttributeModifierTemplate> private final Holder.Reference<MobEffect>
private final MobEffectCategory
private final int
private String
private Object
private Supplier<MobEffectInstance.FactorData>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributeModifier
(Attribute p_19473_, String p_19474_, double p_19475_, AttributeModifier.Operation p_19476_) void
addAttributeModifiers
(AttributeMap p_19479_, int p_19480_) void
applyEffectTick
(LivingEntity p_19467_, int p_19468_) void
applyInstantenousEffect
(Entity p_19462_, Entity p_19463_, LivingEntity p_19464_, int p_19465_, double p_19466_) Deprecated.int
getColor()
protected String
private void
void
initializeClient
(Consumer<IClientMobEffectExtensions> consumer) boolean
boolean
void
onEffectStarted
(LivingEntity p_296490_, int p_296147_) void
removeAttributeModifiers
(AttributeMap p_19470_) setFactorDataFactory
(Supplier<MobEffectInstance.FactorData> p_216880_) boolean
shouldApplyEffectTickThisTick
(int p_295329_, int p_295167_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.IMobEffectExtension
getCurativeItems, getSortOrder
-
Field Details
-
attributeModifiers
-
category
-
color
private final int color -
descriptionId
-
factorDataFactory
-
builtInRegistryHolder
-
effectRenderer
-
-
Constructor Details
-
MobEffect
-
-
Method Details
-
createFactorData
-
applyEffectTick
-
applyInstantenousEffect
public void applyInstantenousEffect(@Nullable Entity p_19462_, @Nullable Entity p_19463_, LivingEntity p_19464_, int p_19465_, double p_19466_) -
shouldApplyEffectTickThisTick
public boolean shouldApplyEffectTickThisTick(int p_295329_, int p_295167_) -
onEffectStarted
-
isInstantenous
public boolean isInstantenous() -
getOrCreateDescriptionId
-
getDescriptionId
-
getDisplayName
-
getCategory
-
getColor
public int getColor() -
addAttributeModifier
public MobEffect addAttributeModifier(Attribute p_19473_, String p_19474_, double p_19475_, AttributeModifier.Operation p_19476_) -
setFactorDataFactory
-
getAttributeModifiers
-
removeAttributeModifiers
-
addAttributeModifiers
-
isBeneficial
public boolean isBeneficial() -
getEffectRendererInternal
-
initClient
private void initClient() -
initializeClient
-
builtInRegistryHolder
Deprecated.
-