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:07 -04:00
parent fcb2b09cb6
commit a0e3395dea

View File

@ -39,7 +39,8 @@ public class BruteLuteAttack implements LuteAttackHandler {
} }
loc.getWorld().spawnParticle(Particle.NOTE, loc, 2, .1, .1, .1, 0); 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) for (Entity target : entities)
if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) { if (MMOUtils.canDamage(stats.getPlayer(), loc, target)) {
@ -52,3 +53,4 @@ public class BruteLuteAttack implements LuteAttackHandler {
}.runTaskTimer(MMOItems.plugin, 0, 1); }.runTaskTimer(MMOItems.plugin, 0, 1);
} }
} }