Reduce the amount of Air Particles

This commit is contained in:
MistPhizzle 2014-07-29 22:30:59 -04:00
parent 9cf8544ae0
commit ee13d2e43b
9 changed files with 17 additions and 17 deletions

View file

@ -1473,30 +1473,30 @@ public class Methods {
}
}
public static void playAirbendingParticles(Location loc) {
public static void playAirbendingParticles(Location loc, int amount) {
String particle = plugin.getConfig().getString("Properties.Air.Particles");
if (particle == null) {
for (int i = 0; i < 20; i++) {
for (int i = 0; i < amount; i++) {
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
}
}
else if (particle.equalsIgnoreCase("spell")) {
for (int i = 0; i < 20; i++) {
for (int i = 0; i < amount; i++) {
ParticleEffect.SPELL.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
}
}
else if (particle.equalsIgnoreCase("blacksmoke")) {
for (int i = 0; i < 20; i++) {
for (int i = 0; i < amount; i++) {
ParticleEffect.SMOKE.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
}
}
else if (particle.equalsIgnoreCase("smoke")) {
for (int i = 0; i < 20; i++) {
for (int i = 0; i < amount; i++) {
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
}
}
else {
for (int i = 0; i < 20; i++) {
for (int i = 0; i < amount; i++) {
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
}
}

View file

@ -223,7 +223,7 @@ public class AirBlast {
}
private void advanceLocation() {
Methods.playAirbendingParticles(location);
Methods.playAirbendingParticles(location, 10);
// ParticleEffect.SPELL.display(location, (float)0, (float)0, (float)0, (float)speed, (int)20);
// location.getWorld().playEffect(location, Effect.SMOKE, 4, (int) range);
location = location.add(direction.clone().multiply(speedfactor));
@ -329,7 +329,7 @@ public class AirBlast {
return;
}
Methods.playAirbendingParticles(origin);
Methods.playAirbendingParticles(origin, 10);
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
// (int) originselectrange);
}

View file

@ -181,7 +181,7 @@ public class AirBurst {
} else if (charged) {
Location location = player.getEyeLocation();
// location = location.add(location.getDirection().normalize());
Methods.playAirbendingParticles(location);
Methods.playAirbendingParticles(location, 10);
// location.getWorld().playEffect(
// location,
// Effect.SMOKE,

View file

@ -129,7 +129,7 @@ public class AirScooter {
double x = Math.cos(Math.toRadians(angles.get(i))) * scooterradius;
double y = ((double) i) / 2 * scooterradius - scooterradius;
double z = Math.sin(Math.toRadians(angles.get(i))) * scooterradius;
Methods.playAirbendingParticles(origin.clone().add(x, y, z));
Methods.playAirbendingParticles(origin.clone().add(x, y, z), 10);
// player.getWorld().playEffect(origin.clone().add(x, y, z),
// Effect.SMOKE, 4, (int) AirBlast.defaultrange);
}

View file

@ -104,7 +104,7 @@ public class AirShield {
Location effect = new Location(origin.getWorld(), x, y, z);
if (!Methods.isRegionProtectedFromBuild(player, "AirShield",
effect))
Methods.playAirbendingParticles(effect);
Methods.playAirbendingParticles(effect, 10);
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4,
// (int) AirBlast.defaultrange);

View file

@ -130,7 +130,7 @@ public class AirSpout {
Location effectloc2 = new Location(location.getWorld(),
location.getX(), block.getY() + i, location.getZ());
Methods.playAirbendingParticles(effectloc2);
Methods.playAirbendingParticles(effectloc2, 15);
// location.getWorld().playEffect(effectloc2, Effect.SMOKE,
// (int) directions[index], (int) height + 5);

View file

@ -266,7 +266,7 @@ public class AirSuction {
}
private void advanceLocation() {
Methods.playAirbendingParticles(location);
Methods.playAirbendingParticles(location, 10);
// location.getWorld().playEffect(location, Effect.SMOKE, 4,
// (int) AirBlast.defaultrange);
location = location.add(direction.clone().multiply(speedfactor));
@ -304,7 +304,7 @@ public class AirSuction {
return;
}
Methods.playAirbendingParticles(origin);
Methods.playAirbendingParticles(origin, 10);
//
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
// (int) originselectrange);

View file

@ -162,7 +162,7 @@ public class AirSwipe {
pushfactor *= factor;
return true;
} else if (System.currentTimeMillis() >= time + maxchargetime) {
Methods.playAirbendingParticles(player.getEyeLocation());
Methods.playAirbendingParticles(player.getEyeLocation(), 10);
// player.getWorld().playEffect(
// player.getEyeLocation(),
// Effect.SMOKE,
@ -219,7 +219,7 @@ public class AirSwipe {
}
}
} else {
Methods.playAirbendingParticles(location);
Methods.playAirbendingParticles(location, 10);
// location.getWorld().playEffect(location, Effect.SMOKE,
// 4, (int) AirBlast.defaultrange);
affectPeople(location, direction);

View file

@ -172,7 +172,7 @@ public class Tornado {
Location effect = new Location(origin.getWorld(), x, y, z);
if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect))
Methods.playAirbendingParticles(effect);
Methods.playAirbendingParticles(effect, 20);
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange);
angles.put(i, angles.get(i) + 25 * (int) speedfactor);