Class FrostRay
java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
com.binaris.wizardry.content.spell.abstr.RaySpell
com.binaris.wizardry.content.spell.ice.FrostRay
-
Field Summary
Fields inherited from class com.binaris.wizardry.content.spell.abstr.RaySpell
aimAssist, hitLiquids, ignoreLivingEntities, ignoreUncollidables, particleJitter, particleSpacing, particleVelocity, Y_OFFSETFields inherited from class com.binaris.wizardry.api.content.spell.Spell
pitch, pitchVariation, volume -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanprotected booleanonBlockHit(CastContext ctx, net.minecraft.world.phys.BlockHitResult blockHit, net.minecraft.world.phys.Vec3 origin) protected booleanonEntityHit(CastContext ctx, net.minecraft.world.phys.EntityHitResult entityHit, net.minecraft.world.phys.Vec3 origin) protected booleanonMiss(CastContext ctx, net.minecraft.world.phys.Vec3 origin, net.minecraft.world.phys.Vec3 direction) protected voidplaySound(net.minecraft.world.level.Level world, double x, double y, double z, int ticksInUse, int duration) Plays this spell's sounds at the given position in the given world.protected voidplaySound(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int castTicks, int duration) Plays this spell's sound at the given entity in the given world.protected @NotNull SpellPropertiesprotected voidspawnParticle(CastContext ctx, double x, double y, double z, double vx, double vy, double vz) Methods inherited from class com.binaris.wizardry.content.spell.abstr.RaySpell
aimAssist, canCastByEntity, canCastByLocation, cast, cast, cast, hitLiquids, ignoreLivingEntities, ignoreUncollidables, particleJitter, particleSpacing, particleVelocity, shootSpell, spawnParticleRayMethods inherited from class com.binaris.wizardry.api.content.spell.Spell
assignProperties, endCast, getAction, getCooldown, getCost, getDesc, getDescriptionFormatted, getDescriptionId, getElement, getIcon, getLocation, getLoopSounds, getOrCreateDescriptionId, getOrCreateLocation, getPitch, getPitchVariation, getProperties, getTier, getType, getVolume, hasEnded, is, is, is, isEmpty, isEnabled, onCharge, playSound, playSoundLoop, playSoundLoop, property, requiresPacket, setProperties, soundValues, toString
-
Constructor Details
-
FrostRay
public FrostRay()
-
-
Method Details
-
onEntityHit
protected boolean onEntityHit(CastContext ctx, net.minecraft.world.phys.EntityHitResult entityHit, net.minecraft.world.phys.Vec3 origin) - Specified by:
onEntityHitin classRaySpell
-
onMiss
protected boolean onMiss(CastContext ctx, net.minecraft.world.phys.Vec3 origin, net.minecraft.world.phys.Vec3 direction) -
onBlockHit
protected boolean onBlockHit(CastContext ctx, net.minecraft.world.phys.BlockHitResult blockHit, net.minecraft.world.phys.Vec3 origin) - Specified by:
onBlockHitin classRaySpell
-
getCharge
public int getCharge() -
spawnParticle
protected void spawnParticle(CastContext ctx, double x, double y, double z, double vx, double vy, double vz) - Overrides:
spawnParticlein classRaySpell
-
playSound
protected void playSound(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int castTicks, int duration) Description copied from class:SpellPlays this spell's sound at the given entity in the given world. This callsSpell.playSound(Level, double, double, double, int, int), passing in the given entity's position as the xyz coordinates. Also checks if the given entity is silent, and if so, does not play the sound.
You should override this is you're trying to implement a custom sound loop, checkFrostRaySpellas an example.- Overrides:
playSoundin classSpell- Parameters:
world- The world to play the sound in.entity- The entity to play the sound at, provided it is not silent.castTicks- The number of ticks this spell has already been cast for, passed in from thecast(...)methods. Not used in the base method, but included for use by subclasses overriding this method.duration- The number of ticks this spell will be cast for, passed in from thecast(...)methods. Not used in the base method, but included for use by subclasses overriding this method.
-
playSound
protected void playSound(net.minecraft.world.level.Level world, double x, double y, double z, int ticksInUse, int duration) Description copied from class:SpellPlays this spell's sounds at the given position in the given world. This is not called automatically; subclasses should call it at the appropriate point(s) in the cast methods. Extend this method entirely if you want to add extra sounds or change the sound behaviour. -
isInstantCast
public boolean isInstantCast()- Overrides:
isInstantCastin classSpell
-
properties
- Specified by:
propertiesin classSpell
-