Class RemoveCurse


public class RemoveCurse extends BuffSpell
  • Constructor Details

    • RemoveCurse

      public RemoveCurse()
  • Method Details

    • applyEffects

      protected boolean applyEffects(CastContext ctx, net.minecraft.world.entity.LivingEntity caster)
      Description copied from class: BuffSpell
      Applies the mob effects to the target. The duration and amplifier of the effects are calculated based on the spell properties and the potency and duration modifiers of the cast context.
      Overrides:
      applyEffects in class BuffSpell
      Parameters:
      ctx - the cast context of the spell, used to get the modifiers for duration and potency, as well as the world for applying the effects.
      caster - the target of the spell, the entity that is going to receive the mob effects. Normally the caster, but if the spell is cast by location, it will be the nearest entity to the selected location.
      Returns:
      true if the effects were applied, false if the target already had all the effects or if there was an error applying the effects.
    • spawnParticles

      protected void spawnParticles(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity caster)
      Description copied from class: BuffSpell
      Spawns particles when the spell is cast. By default, it spawns some sparkle particles around the target and a buff particle on the target. You can override this method to spawn different particles or to change the way the particles are spawned. The color of the particles is determined by the r,g,b fields of the spell, which are set in the constructor. The amount of particles spawned is determined by the particleCount field, which can be set using the particleCount() method.

      Note that this method is only called on the client side.

      Overrides:
      spawnParticles in class BuffSpell
      Parameters:
      world - the world where the particles are going to be spawned, used to spawn the particles.
      caster - the entity that is going to be the center of the particles, normally the caster of the spell, but if the spell is cast by location, it will be the nearest entity to the selected location.
    • properties

      @NotNull protected @NotNull SpellProperties properties()
      Description copied from class: Spell
      This method is where you should set the default properties for your spell when creating a new spell class. This method is called in the constructor of the Spell class, and the properties returned by this method are assigned to the spell's properties field.
      Overrides:
      properties in class BuffSpell
      Returns:
      A SpellProperties object with the default properties for your spell.