From a0e3395deacda1866917f2571c605b75c67755a7 Mon Sep 17 00:00:00 2001 From: HexedHero Date: Wed, 25 Sep 2019 02:48:07 -0400 Subject: [PATCH] Stopped sounds stacking on lutes Instead of playing 3 times per tick it now just plays once Particles still stack but it ruins the effect whereas the sound literally kills your ears especially when you change the sound. --- .../interaction/weapon/untargeted/lute/BruteLuteAttack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/lute/BruteLuteAttack.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/lute/BruteLuteAttack.java index 51178536..9c44b747 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/lute/BruteLuteAttack.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/lute/BruteLuteAttack.java @@ -39,7 +39,8 @@ public class BruteLuteAttack implements LuteAttackHandler { } loc.getWorld().spawnParticle(Particle.NOTE, loc, 2, .1, .1, .1, 0); - loc.getWorld().playSound(loc, sound, 2, (float) (.5 + (double) ti / range)); + if (j == 0) + loc.getWorld().playSound(loc, sound, 2, (float) (.5 + (double) ti / range)); for (Entity target : entities) if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) { @@ -52,3 +53,4 @@ public class BruteLuteAttack implements LuteAttackHandler { }.runTaskTimer(MMOItems.plugin, 0, 1); } } +