Class RemoveCurse
java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
com.binaris.wizardry.content.spell.abstr.BuffSpell
com.binaris.wizardry.content.spell.healing.RemoveCurse
-
Field Summary
Fields inherited from class com.binaris.wizardry.content.spell.abstr.BuffSpell
b, g, mobEffects, particleCount, rFields inherited from class com.binaris.wizardry.api.content.spell.Spell
pitch, pitchVariation, volume -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanapplyEffects(CastContext ctx, net.minecraft.world.entity.LivingEntity caster) Applies the mob effects to the target.protected @NotNull SpellPropertiesThis method is where you should set the default properties for your spell when creating a new spell class.protected voidspawnParticles(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity caster) Spawns particles when the spell is cast.Methods inherited from class com.binaris.wizardry.content.spell.abstr.BuffSpell
canCastByEntity, canCastByLocation, cast, cast, cast, getEffectDurationProperty, getEffectStrengthProperty, getMobEffects, getStandardBonusAmplifier, particleCountMethods inherited from class com.binaris.wizardry.api.content.spell.Spell
assignProperties, endCast, equals, getAction, getChargeUp, getCooldown, getCost, getDesc, getDescriptionFormatted, getDescriptionId, getElement, getIcon, getLocation, getLoopSounds, getOrCreateDescriptionId, getOrCreateLocation, getPitch, getPitchVariation, getProperties, getTier, getType, getVolume, isEnabled, isInstantCast, onCharge, playSound, playSound, playSound, playSoundLoop, playSoundLoop, property, requiresPacket, soundValues, toString
-
Constructor Details
-
RemoveCurse
public RemoveCurse()
-
-
Method Details
-
applyEffects
Description copied from class:BuffSpellApplies 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:
applyEffectsin classBuffSpell- 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:BuffSpellSpawns 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:
spawnParticlesin classBuffSpell- 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
Description copied from class:SpellThis 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:
propertiesin classBuffSpell- Returns:
- A SpellProperties object with the default properties for your spell.
-