Class Decay
java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
com.binaris.wizardry.content.spell.abstr.ConstructSpell<T>
com.binaris.wizardry.content.spell.abstr.ConstructRangedSpell<DecayConstruct>
com.binaris.wizardry.content.spell.necromancy.Decay
-
Field Summary
FieldsFields inherited from class com.binaris.wizardry.content.spell.abstr.ConstructRangedSpell
hitLiquids, ignoreUncollidablesFields inherited from class com.binaris.wizardry.content.spell.abstr.ConstructSpell
allowOverlap, constructFactory, permanent, requiresFloorFields inherited from class com.binaris.wizardry.api.content.spell.Spell
pitch, pitchVariation, volume -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull SpellPropertiesThis method is where you should set the default properties for your spell when creating a new spell class.protected booleanspawnConstruct(CastContext ctx, net.minecraft.world.phys.Vec3 vec3, @Nullable net.minecraft.core.Direction side) Spawns the construct entity in the world at the specified position.Methods inherited from class com.binaris.wizardry.content.spell.abstr.ConstructRangedSpell
cast, cast, cast, hitLiquids, ignoreUncollidablesMethods inherited from class com.binaris.wizardry.content.spell.abstr.ConstructSpell
addConstructExtras, canCastByEntity, canCastByLocation, floor, overlap, requiresPacketMethods 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, soundValues, toString
-
Field Details
-
PATCHES_SPAWNED
-
-
Constructor Details
-
Decay
public Decay()
-
-
Method Details
-
spawnConstruct
protected boolean spawnConstruct(CastContext ctx, net.minecraft.world.phys.Vec3 vec3, @Nullable @Nullable net.minecraft.core.Direction side) Description copied from class:ConstructSpellSpawns the construct entity in the world at the specified position.This method creates the construct entity using the factory, sets its position and caster, configures its lifetime, applies damage and size multipliers, and adds it to the world.
If
ConstructSpell.allowOverlapis false, this method checks for existing constructs of the same type at the target position and prevents spawning if one exists.This method also calls
ConstructSpell.addConstructExtras(CastContext, MagicConstructEntity, Direction)to allow subclasses to apply additional modifications to the construct before spawning.- Overrides:
spawnConstructin classConstructSpell<DecayConstruct>- Parameters:
ctx- the cast context containing spell information and modifiersvec3- the position where the construct should be spawnedside- the direction the construct is facing, or null if not applicable- Returns:
- true if the construct was successfully spawned, false if spawning was prevented (e.g., due to overlap)
-
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 classConstructSpell<DecayConstruct>- Returns:
- A SpellProperties object with the default properties for your spell.
-