Clean up some Firebending Sounds

This commit is contained in:
MistPhizzle 2014-09-28 10:44:06 -04:00
parent c30df35a87
commit 54bd3468b4
2 changed files with 13 additions and 5 deletions

View file

@ -102,8 +102,12 @@ public class FireShield {
} }
for (Block block : blocks) { for (Block block : blocks) {
if (!Methods.isRegionProtectedFromBuild(player, "FireShield", block.getLocation())) if (!Methods.isRegionProtectedFromBuild(player, "FireShield", block.getLocation())) {
block.getWorld().playEffect(block.getLocation(), Effect.MOBSPAWNER_FLAMES, 0, 20); block.getWorld().playEffect(block.getLocation(), Effect.MOBSPAWNER_FLAMES, 0, 20);
if (Methods.rand.nextInt(7) == 0) {
Methods.playFirebendingSound(block.getLocation());
}
}
} }
for (Entity entity : Methods.getEntitiesAroundPoint(location, radius)) { for (Entity entity : Methods.getEntitiesAroundPoint(location, radius)) {
@ -140,8 +144,12 @@ public class FireShield {
} }
for (Block block : blocks) { for (Block block : blocks) {
if (!Methods.isRegionProtectedFromBuild(player, "FireShield", block.getLocation())) if (!Methods.isRegionProtectedFromBuild(player, "FireShield", block.getLocation())) {
block.getWorld().playEffect(block.getLocation(), Effect.MOBSPAWNER_FLAMES, 0, 20); block.getWorld().playEffect(block.getLocation(), Effect.MOBSPAWNER_FLAMES, 0, 20);
if (Methods.rand.nextInt(4) == 0) {
Methods.playFirebendingSound(block.getLocation());
}
}
} }
for (Entity entity : Methods.getEntitiesAroundPoint(location, discradius)) { for (Entity entity : Methods.getEntitiesAroundPoint(location, discradius)) {
@ -168,12 +176,12 @@ public class FireShield {
} }
} }
} }
public static boolean isWithinShield(Location loc) { public static boolean isWithinShield(Location loc) {
for (Player player : instances.keySet()){ for (Player player : instances.keySet()){
FireShield fshield = instances.get(player); FireShield fshield = instances.get(player);
Location playerLoc = fshield.player.getLocation(); Location playerLoc = fshield.player.getLocation();
if(fshield.shield){ if(fshield.shield){
if(playerLoc.distance(loc) <= FireShield.radius) if(playerLoc.distance(loc) <= FireShield.radius)
return true; return true;

View file

@ -150,7 +150,7 @@ public class WallOfFire {
block.getWorld().playEffect(block.getLocation(), block.getWorld().playEffect(block.getLocation(),
Effect.MOBSPAWNER_FLAMES, 0, 15); Effect.MOBSPAWNER_FLAMES, 0, 15);
if(Methods.rand.nextInt(4) <= 2) { if (Methods.rand.nextInt(7) == 0) {
Methods.playFirebendingSound(block.getLocation()); Methods.playFirebendingSound(block.getLocation());
} }
} }