From d6f30d6519ee11dcce14e618e2d33f45ddbfccfe Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sun, 18 Oct 2020 00:56:30 +0100 Subject: [PATCH] Change guardian beam to use a single sound event and time it with the damage --- .../electroblob/wizardry/spell/GuardianBeam.java | 13 +------------ src/main/resources/assets/ebwizardry/sounds.json | 4 +--- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/main/java/electroblob/wizardry/spell/GuardianBeam.java b/src/main/java/electroblob/wizardry/spell/GuardianBeam.java index 14b4108b..c1b8684e 100644 --- a/src/main/java/electroblob/wizardry/spell/GuardianBeam.java +++ b/src/main/java/electroblob/wizardry/spell/GuardianBeam.java @@ -8,7 +8,6 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.MobEffects; import net.minecraft.util.EnumFacing; -import net.minecraft.util.SoundEvent; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; @@ -22,19 +21,9 @@ public class GuardianBeam extends SpellRay { addProperties(DAMAGE, AIR_DEPLETION); } - @Override - protected SoundEvent[] createSounds(){ - return this.createContinuousSpellSounds(); - } - - @Override - protected void playSound(World world, EntityLivingBase entity, int ticksInUse, int duration, SpellModifiers modifiers, String... sounds){ - this.playSoundLoop(world, entity, ticksInUse); - } - @Override protected void playSound(World world, double x, double y, double z, int ticksInUse, int duration, SpellModifiers modifiers, String... sounds){ - this.playSoundLoop(world, x, y, z, ticksInUse, duration); + if(ticksInUse % 50 == 1) super.playSound(world, x, y, z, ticksInUse, duration, modifiers, sounds); } @Override diff --git a/src/main/resources/assets/ebwizardry/sounds.json b/src/main/resources/assets/ebwizardry/sounds.json index a94a296f..b7c338c3 100644 --- a/src/main/resources/assets/ebwizardry/sounds.json +++ b/src/main/resources/assets/ebwizardry/sounds.json @@ -218,9 +218,7 @@ "spell.greater_ward": {"category": "spells", "sounds": ["ebwizardry:buff_large"]}, "spell.group_heal": {"category": "spells", "sounds": ["ebwizardry:heal"]}, "spell.growth_aura": {"category": "spells", "sounds": ["ebwizardry:conjure_large"]}, - "spell.guardian_beam.start": {"category": "spells", "sounds": ["mob/guardian/attack_loop"]}, - "spell.guardian_beam.loop": {"category": "spells", "sounds": ["mob/guardian/attack_loop"]}, - "spell.guardian_beam.end": {"category": "spells", "sounds": ["mob/guardian/attack_loop"]}, + "spell.guardian_beam": {"category": "spells", "sounds": ["mob/guardian/attack_loop"]}, "spell.hailstorm": {"category": "spells", "sounds": ["mob/illusion_illager/prepare_blind"]}, "spell.heal": {"category": "spells", "sounds": ["ebwizardry:heal"]}, "spell.heal_ally": {"category": "spells", "sounds": ["ebwizardry:heal"]},