Class EffectCure

java.lang.Object
net.neoforged.neoforge.common.EffectCure

public final class EffectCure extends Object
Defines a cure that is used to remove MobEffects 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 Details

  • Constructor Details

    • EffectCure

      private EffectCure(String name)
      Use get(String) to get or create an EffectCure
  • Method Details

    • getAllCures

      public static Collection<EffectCure> getAllCures()
      Returns all registered cures. This collection can be kept around, and will update itself in response to changes to the map. See ConcurrentHashMap.values() for details.
      Returns:
      all registered cures
    • get

      public static EffectCure get(String name)
      Gets or creates a new EffectCure for the given name.
    • name

      public String name()
      Returns the name of this cure.
      Returns:
      the name of this cure
    • toString

      public String toString()
      Overrides:
      toString in class Object