Class FontOfMana
java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
com.binaris.wizardry.content.spell.abstr.AreaEffectSpell
com.binaris.wizardry.content.spell.healing.FontOfMana
-
Field Summary
Fields inherited from class com.binaris.wizardry.content.spell.abstr.AreaEffectSpell
alwaysSucceed, particleDensity, targetAlliesFields inherited from class com.binaris.wizardry.api.content.spell.Spell
pitch, pitchVariation, volume -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaffectEntity(CastContext ctx, net.minecraft.world.phys.Vec3 origin, net.minecraft.world.entity.LivingEntity target, int targetCount) Applies the spell's effect to a single target entity.static voidprotected @NotNull SpellPropertiesThis method is where you should set the default properties for your spell when creating a new spell class.protected voidspawnParticle(net.minecraft.world.level.Level world, double x, double y, double z) Spawns a single particle at the specified position.Methods inherited from class com.binaris.wizardry.content.spell.abstr.AreaEffectSpell
alwaysSucceed, canCastByEntity, canCastByLocation, cast, cast, cast, findAndAffectEntities, particleDensity, spawnParticleEffect, targetAlliesMethods 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
-
FontOfMana
public FontOfMana()
-
-
Method Details
-
onSpellCastPreEvent
-
affectEntity
protected boolean affectEntity(CastContext ctx, net.minecraft.world.phys.Vec3 origin, net.minecraft.world.entity.LivingEntity target, int targetCount) Description copied from class:AreaEffectSpellApplies the spell's effect to a single target entity.This method must be implemented by subclasses to define what happens when the spell affects an entity. It is called for each valid target found within the area of effect, in order of distance from the origin (closest first).
- Specified by:
affectEntityin classAreaEffectSpell- Parameters:
ctx- the cast context containing spell information and modifiersorigin- the center point of the area effecttarget- the entity to affecttargetCount- the index of this target in the sorted list (0 for the closest entity, 1 for the second closest, etc.)- Returns:
- true if the entity was successfully affected, false otherwise
-
spawnParticle
protected void spawnParticle(net.minecraft.world.level.Level world, double x, double y, double z) Description copied from class:AreaEffectSpellSpawns a single particle at the specified position.Override this method in subclasses to define which particle type to spawn and with what parameters. This method is called multiple times by
AreaEffectSpell.spawnParticleEffect(CastContext, Vec3, double)to create the full particle effect.- Overrides:
spawnParticlein classAreaEffectSpell- Parameters:
world- the world to spawn the particle inx- the x coordinatey- the y coordinatez- the z coordinate
-
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.- Specified by:
propertiesin classSpell- Returns:
- A SpellProperties object with the default properties for your spell.
-