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.
This commit is contained in:
HexedHero 2019-09-25 02:48:14 -04:00
parent 52cff85eed
commit b002a481ee

View File

@ -39,7 +39,8 @@ public class SimpleLuteAttack implements LuteAttackHandler {
}
loc.getWorld().spawnParticle(Particle.NOTE, loc, 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 SimpleLuteAttack implements LuteAttackHandler {
}.runTaskTimer(MMOItems.plugin, 0, 1);
}
}