Class ArrowRain
java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
com.binaris.wizardry.content.spell.abstr.ConstructSpell<ArrowRainConstruct>
com.binaris.wizardry.content.spell.sorcery.ArrowRain
-
Field Summary
Fields 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 voidaddConstructExtras(CastContext ctx, ArrowRainConstruct construct, net.minecraft.core.Direction side) Applies additional modifications to the construct after it has been created and configured, but before it is added to the world.protected @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.ConstructSpell
canCastByEntity, canCastByLocation, cast, cast, cast, 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
-
Constructor Details
-
ArrowRain
public ArrowRain()
-
-
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<ArrowRainConstruct>- 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)
-
addConstructExtras
protected void addConstructExtras(CastContext ctx, ArrowRainConstruct construct, net.minecraft.core.Direction side) Description copied from class:ConstructSpellApplies additional modifications to the construct after it has been created and configured, but before it is added to the world.Override this method in subclasses to apply spell-specific behavior, additional attributes, or visual effects to the construct.
- Overrides:
addConstructExtrasin classConstructSpell<ArrowRainConstruct>- Parameters:
ctx- the cast context containing spell information and modifiersconstruct- construct entity that has been created and configuredside- direction the construct is facing, or null if not applicable
-
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<ArrowRainConstruct>- Returns:
- A SpellProperties object with the default properties for your spell.
-