Package net.neoforged.neoforge.common
Class EffectCure
java.lang.Object
net.neoforged.neoforge.common.EffectCure
Defines a cure that is used to remove
MobEffect
s from a LivingEntity
.
Cures can be added to or removed from your own effects via IMobEffectExtension.fillEffectCures(Set, MobEffectInstance)
or any effect by modifying the set of cures on the MobEffectInstance
in MobEffectEvent.Added
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec
<EffectCure> private static final Map
<String, EffectCure> private final String
static final StreamCodec
<io.netty.buffer.ByteBuf, EffectCure> -
Constructor Summary
ModifierConstructorDescriptionprivate
EffectCure
(String name) Useget(String)
to get or create an EffectCure -
Method Summary
Modifier and TypeMethodDescriptionstatic EffectCure
Gets or creates a new EffectCure for the given name.static Collection
<EffectCure> Returns all registered cures.name()
Returns the name of this cure.toString()
-
Field Details
-
CURES
-
CODEC
-
STREAM_CODEC
-
name
-
-
Constructor Details
-
EffectCure
Useget(String)
to get or create an EffectCure
-
-
Method Details
-
getAllCures
Returns all registered cures. This collection can be kept around, and will update itself in response to changes to the map. SeeConcurrentHashMap.values()
for details.- Returns:
- all registered cures
-
get
Gets or creates a new EffectCure for the given name. -
name
Returns the name of this cure.- Returns:
- the name of this cure
-
toString
-