Change guardian beam to use a single sound event and time it with the damage

This commit is contained in:
Electroblob77
2020-10-18 00:56:30 +01:00
parent eb864338b4
commit d6f30d6519
2 changed files with 2 additions and 15 deletions
@@ -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
@@ -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"]},