mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Reduce the amount of Air Particles
This commit is contained in:
parent
9cf8544ae0
commit
ee13d2e43b
9 changed files with 17 additions and 17 deletions
|
@ -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");
|
String particle = plugin.getConfig().getString("Properties.Air.Particles");
|
||||||
if (particle == null) {
|
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);
|
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (particle.equalsIgnoreCase("spell")) {
|
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);
|
ParticleEffect.SPELL.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (particle.equalsIgnoreCase("blacksmoke")) {
|
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);
|
ParticleEffect.SMOKE.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (particle.equalsIgnoreCase("smoke")) {
|
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);
|
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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);
|
ParticleEffect.CLOUD.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ public class AirBlast {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void advanceLocation() {
|
private void advanceLocation() {
|
||||||
Methods.playAirbendingParticles(location);
|
Methods.playAirbendingParticles(location, 10);
|
||||||
// ParticleEffect.SPELL.display(location, (float)0, (float)0, (float)0, (float)speed, (int)20);
|
// ParticleEffect.SPELL.display(location, (float)0, (float)0, (float)0, (float)speed, (int)20);
|
||||||
// location.getWorld().playEffect(location, Effect.SMOKE, 4, (int) range);
|
// location.getWorld().playEffect(location, Effect.SMOKE, 4, (int) range);
|
||||||
location = location.add(direction.clone().multiply(speedfactor));
|
location = location.add(direction.clone().multiply(speedfactor));
|
||||||
|
@ -329,7 +329,7 @@ public class AirBlast {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Methods.playAirbendingParticles(origin);
|
Methods.playAirbendingParticles(origin, 10);
|
||||||
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
|
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
|
||||||
// (int) originselectrange);
|
// (int) originselectrange);
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class AirBurst {
|
||||||
} else if (charged) {
|
} else if (charged) {
|
||||||
Location location = player.getEyeLocation();
|
Location location = player.getEyeLocation();
|
||||||
// location = location.add(location.getDirection().normalize());
|
// location = location.add(location.getDirection().normalize());
|
||||||
Methods.playAirbendingParticles(location);
|
Methods.playAirbendingParticles(location, 10);
|
||||||
// location.getWorld().playEffect(
|
// location.getWorld().playEffect(
|
||||||
// location,
|
// location,
|
||||||
// Effect.SMOKE,
|
// Effect.SMOKE,
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class AirScooter {
|
||||||
double x = Math.cos(Math.toRadians(angles.get(i))) * scooterradius;
|
double x = Math.cos(Math.toRadians(angles.get(i))) * scooterradius;
|
||||||
double y = ((double) i) / 2 * scooterradius - scooterradius;
|
double y = ((double) i) / 2 * scooterradius - scooterradius;
|
||||||
double z = Math.sin(Math.toRadians(angles.get(i))) * 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),
|
// player.getWorld().playEffect(origin.clone().add(x, y, z),
|
||||||
// Effect.SMOKE, 4, (int) AirBlast.defaultrange);
|
// Effect.SMOKE, 4, (int) AirBlast.defaultrange);
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class AirShield {
|
||||||
Location effect = new Location(origin.getWorld(), x, y, z);
|
Location effect = new Location(origin.getWorld(), x, y, z);
|
||||||
if (!Methods.isRegionProtectedFromBuild(player, "AirShield",
|
if (!Methods.isRegionProtectedFromBuild(player, "AirShield",
|
||||||
effect))
|
effect))
|
||||||
Methods.playAirbendingParticles(effect);
|
Methods.playAirbendingParticles(effect, 10);
|
||||||
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4,
|
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4,
|
||||||
// (int) AirBlast.defaultrange);
|
// (int) AirBlast.defaultrange);
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class AirSpout {
|
||||||
Location effectloc2 = new Location(location.getWorld(),
|
Location effectloc2 = new Location(location.getWorld(),
|
||||||
location.getX(), block.getY() + i, location.getZ());
|
location.getX(), block.getY() + i, location.getZ());
|
||||||
|
|
||||||
Methods.playAirbendingParticles(effectloc2);
|
Methods.playAirbendingParticles(effectloc2, 15);
|
||||||
// location.getWorld().playEffect(effectloc2, Effect.SMOKE,
|
// location.getWorld().playEffect(effectloc2, Effect.SMOKE,
|
||||||
// (int) directions[index], (int) height + 5);
|
// (int) directions[index], (int) height + 5);
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,7 @@ public class AirSuction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void advanceLocation() {
|
private void advanceLocation() {
|
||||||
Methods.playAirbendingParticles(location);
|
Methods.playAirbendingParticles(location, 10);
|
||||||
// location.getWorld().playEffect(location, Effect.SMOKE, 4,
|
// location.getWorld().playEffect(location, Effect.SMOKE, 4,
|
||||||
// (int) AirBlast.defaultrange);
|
// (int) AirBlast.defaultrange);
|
||||||
location = location.add(direction.clone().multiply(speedfactor));
|
location = location.add(direction.clone().multiply(speedfactor));
|
||||||
|
@ -304,7 +304,7 @@ public class AirSuction {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Methods.playAirbendingParticles(origin);
|
Methods.playAirbendingParticles(origin, 10);
|
||||||
//
|
//
|
||||||
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
|
// origin.getWorld().playEffect(origin, Effect.SMOKE, 4,
|
||||||
// (int) originselectrange);
|
// (int) originselectrange);
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class AirSwipe {
|
||||||
pushfactor *= factor;
|
pushfactor *= factor;
|
||||||
return true;
|
return true;
|
||||||
} else if (System.currentTimeMillis() >= time + maxchargetime) {
|
} else if (System.currentTimeMillis() >= time + maxchargetime) {
|
||||||
Methods.playAirbendingParticles(player.getEyeLocation());
|
Methods.playAirbendingParticles(player.getEyeLocation(), 10);
|
||||||
// player.getWorld().playEffect(
|
// player.getWorld().playEffect(
|
||||||
// player.getEyeLocation(),
|
// player.getEyeLocation(),
|
||||||
// Effect.SMOKE,
|
// Effect.SMOKE,
|
||||||
|
@ -219,7 +219,7 @@ public class AirSwipe {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Methods.playAirbendingParticles(location);
|
Methods.playAirbendingParticles(location, 10);
|
||||||
// location.getWorld().playEffect(location, Effect.SMOKE,
|
// location.getWorld().playEffect(location, Effect.SMOKE,
|
||||||
// 4, (int) AirBlast.defaultrange);
|
// 4, (int) AirBlast.defaultrange);
|
||||||
affectPeople(location, direction);
|
affectPeople(location, direction);
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class Tornado {
|
||||||
|
|
||||||
Location effect = new Location(origin.getWorld(), x, y, z);
|
Location effect = new Location(origin.getWorld(), x, y, z);
|
||||||
if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect))
|
if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect))
|
||||||
Methods.playAirbendingParticles(effect);
|
Methods.playAirbendingParticles(effect, 20);
|
||||||
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange);
|
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange);
|
||||||
|
|
||||||
angles.put(i, angles.get(i) + 25 * (int) speedfactor);
|
angles.put(i, angles.get(i) + 25 * (int) speedfactor);
|
||||||
|
|
Loading…
Reference in a new issue