mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
commit
319f67cf96
24 changed files with 108 additions and 10 deletions
|
@ -52,6 +52,7 @@ public class AvatarState {
|
|||
}
|
||||
}
|
||||
new Flight(player);
|
||||
Methods.playAvatarSound(player.getLocation());
|
||||
instances.put(player, this);
|
||||
if (cooldown != 0) {
|
||||
cooldowns.put(player.getName(), System.currentTimeMillis());
|
||||
|
|
|
@ -1490,8 +1490,7 @@ public class Methods {
|
|||
}
|
||||
|
||||
moveEarthBlock(block, affectedblock);
|
||||
block.getWorld().playEffect(block.getLocation(),
|
||||
Effect.GHAST_SHOOT, 0, 4);
|
||||
playEarthbendingSound(block.getLocation());
|
||||
|
||||
for (double i = 1; i < chainlength; i++) {
|
||||
affectedblock = location
|
||||
|
@ -1979,10 +1978,34 @@ public class Methods {
|
|||
loc.getWorld().playSound(loc, Sound.FIRE, 1, 10);
|
||||
}
|
||||
|
||||
public static void playCombustionSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.FIREWORK_BLAST, 1, -1);
|
||||
}
|
||||
|
||||
public static void playEarthbendingSound(Location loc) {
|
||||
loc.getWorld().playEffect(loc, Effect.GHAST_SHOOT, 0, 10);
|
||||
}
|
||||
|
||||
public static void playMetalbendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.IRONGOLEM_HIT, 1, 10);
|
||||
}
|
||||
|
||||
public static void playWaterbendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.WATER, 1, 10);
|
||||
}
|
||||
|
||||
public static void playIcebendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.FIRE_IGNITE, 10, 4);
|
||||
}
|
||||
|
||||
public static void playAirbendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.CREEPER_HISS, 1, 5);
|
||||
}
|
||||
|
||||
public static void playAvatarSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.ANVIL_LAND, 1, 10);
|
||||
}
|
||||
|
||||
public static Block getTopBlock(Location loc, int range){
|
||||
return getTopBlock(loc,range,range);
|
||||
}
|
||||
|
|
|
@ -205,6 +205,9 @@ public class AirBlast {
|
|||
|
||||
private void advanceLocation() {
|
||||
Methods.playAirbendingParticles(location, 10);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playAirbendingSound(location);
|
||||
}
|
||||
location = location.add(direction.clone().multiply(speedfactor));
|
||||
}
|
||||
|
||||
|
|
|
@ -116,6 +116,9 @@ public class AirScooter {
|
|||
player.setSprinting(false);
|
||||
player.removePotionEffect(PotionEffectType.SPEED);
|
||||
player.setVelocity(velocity);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playAirbendingSound(player.getLocation());
|
||||
}
|
||||
}
|
||||
|
||||
private void spinScooter() {
|
||||
|
|
|
@ -116,8 +116,13 @@ public class AirShield {
|
|||
|
||||
Location effect = new Location(origin.getWorld(), x, y, z);
|
||||
if (!Methods.isRegionProtectedFromBuild(player, "AirShield",
|
||||
effect))
|
||||
effect)) {
|
||||
Methods.playAirbendingParticles(effect, 10);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playFirebendingSound(effect);
|
||||
}
|
||||
}
|
||||
|
||||
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4,
|
||||
// (int) AirBlast.defaultrange);
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ public class AirSpout {
|
|||
}
|
||||
player.setFallDistance(0);
|
||||
player.setSprinting(false);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playAirbendingSound(player.getLocation());
|
||||
}
|
||||
Block block = getGround();
|
||||
if (block != null) {
|
||||
double dy = player.getLocation().getY() - block.getY();
|
||||
|
|
|
@ -143,6 +143,9 @@ public class Suffocate {
|
|||
|
||||
for(Location airsphere : Methods.getCircle(entity.getLocation(), 3, 3, false, true, 0)) {
|
||||
Methods.playAirbendingParticles(airsphere, 1);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playAirbendingSound(airsphere);
|
||||
}
|
||||
}
|
||||
entity.setFallDistance(0);
|
||||
new TempPotionEffect((LivingEntity) entity, slow);
|
||||
|
|
|
@ -182,8 +182,12 @@ public class Tornado {
|
|||
z = origin.getZ() + timefactor * factor * radius * Math.sin(angle);
|
||||
|
||||
Location effect = new Location(origin.getWorld(), x, y, z);
|
||||
if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect))
|
||||
if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect)) {
|
||||
Methods.playAirbendingParticles(effect, 20);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playAirbendingSound(effect);
|
||||
}
|
||||
}
|
||||
// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange);
|
||||
|
||||
angles.put(i, angles.get(i) + 25 * (int) speedfactor);
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
@ -83,6 +84,7 @@ public class Catapult {
|
|||
distance = source.distance;
|
||||
time = source.time;
|
||||
instances.put(player.getEntityId(), this);
|
||||
Methods.playEarthbendingSound(player.getLocation());
|
||||
fly();
|
||||
}
|
||||
|
||||
|
|
|
@ -174,9 +174,7 @@ public class EarthBlast {
|
|||
destination = null;
|
||||
} else {
|
||||
progressing = true;
|
||||
sourceblock.getWorld().playEffect(
|
||||
sourceblock.getLocation(), Effect.GHAST_SHOOT, 0,
|
||||
10);
|
||||
Methods.playEarthbendingSound(sourceblock.getLocation());
|
||||
// direction = getDirection().normalize();
|
||||
if (sourcetype != Material.SAND
|
||||
&& sourcetype != Material.GRAVEL) {
|
||||
|
|
|
@ -159,9 +159,9 @@ public class Combustion {
|
|||
private void advanceLocation() {
|
||||
ParticleEffect.FIREWORKS_SPARK.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 5);
|
||||
ParticleEffect.FLAME.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 2);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playFirebendingSound(location);
|
||||
}
|
||||
//if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playCombustionSound(location);
|
||||
//}
|
||||
location = location.add(direction.clone().multiply(speedfactor));
|
||||
}
|
||||
|
||||
|
|
|
@ -149,6 +149,10 @@ public class WallOfFire {
|
|||
for (Block block : blocks) {
|
||||
block.getWorld().playEffect(block.getLocation(),
|
||||
Effect.MOBSPAWNER_FLAMES, 0, 15);
|
||||
|
||||
if(Methods.rand.nextInt(4) <= 2) {
|
||||
Methods.playFirebendingSound(block.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ public class FreezeMelt {
|
|||
return;
|
||||
byte data = block.getData();
|
||||
block.setType(Material.ICE);
|
||||
Methods.playIcebendingSound(block.getLocation());
|
||||
frozenblocks.put(block, data);
|
||||
}
|
||||
|
||||
|
|
|
@ -299,6 +299,9 @@ public class IceBlast {
|
|||
|
||||
ParticleEffect.SNOWBALL_POOF.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 100);
|
||||
ParticleEffect.SNOW_SHOVEL.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 100);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playFirebendingSound(location);
|
||||
}
|
||||
location = location.add(direction.clone());
|
||||
|
||||
} else if (prepared) {
|
||||
|
|
|
@ -218,6 +218,7 @@ public class IceSpike {
|
|||
}
|
||||
}
|
||||
affectedblock.setType(Material.ICE);
|
||||
Methods.playIcebendingSound(block.getLocation());
|
||||
loadAffectedBlocks();
|
||||
|
||||
if (location.distance(origin) >= height) {
|
||||
|
|
|
@ -272,6 +272,10 @@ public class IceSpike2 {
|
|||
returnWater();
|
||||
}
|
||||
}
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playIcebendingSound(location);
|
||||
}
|
||||
|
||||
if (!progressing) {
|
||||
cancel();
|
||||
|
|
|
@ -173,6 +173,10 @@ public class OctopusForm {
|
|||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(player.getLocation());
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() > time + interval) {
|
||||
time = System.currentTimeMillis();
|
||||
|
|
|
@ -47,6 +47,9 @@ public class SpikeField {
|
|||
.getBlock().getX() && testblock.getZ() == p
|
||||
.getEyeLocation().getBlock().getZ())) {
|
||||
iceblocks.add(testblock);
|
||||
for(Block iceblockforsound : iceblocks) {
|
||||
Methods.playIcebendingSound(iceblockforsound.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ public class Torrent {
|
|||
if (Methods.isTransparentToEarthbending(player, block) && block.getType() != Material.ICE) {
|
||||
TempBlock tblock = new TempBlock(block, Material.ICE, (byte) 0);
|
||||
frozenblocks.put(tblock, player);
|
||||
Methods.playIcebendingSound(block.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +114,10 @@ public class Torrent {
|
|||
returnWater(location);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(location);
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() > time + interval) {
|
||||
time = System.currentTimeMillis();
|
||||
|
|
|
@ -151,6 +151,12 @@ public class TorrentBurst {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(Block sound : torrentblocks) {
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(sound.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (angles.isEmpty())
|
||||
heights.remove(id);
|
||||
|
|
|
@ -304,6 +304,10 @@ public class WaterManipulation {
|
|||
|
||||
} else {
|
||||
Methods.removeSpouts(location, player);
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(location);
|
||||
}
|
||||
|
||||
double radius = FireBlast.affectingradius;
|
||||
Player source = player;
|
||||
|
|
|
@ -119,6 +119,9 @@ public class WaterSpout {
|
|||
|
||||
player.setFallDistance(0);
|
||||
player.setSprinting(false);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(player.getLocation());
|
||||
}
|
||||
// if (player.getVelocity().length() > threshold) {
|
||||
// // Methods.verbose("Too fast!");
|
||||
// player.setVelocity(player.getVelocity().clone().normalize()
|
||||
|
|
|
@ -124,6 +124,7 @@ public class WaterWall {
|
|||
for (Block block : wallblocks.keySet()) {
|
||||
if (wallblocks.get(block) == player) {
|
||||
new TempBlock(block, Material.ICE, (byte) 0);
|
||||
Methods.playIcebendingSound(block.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,6 +239,11 @@ public class WaterWall {
|
|||
returnWater();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(location);
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() - time >= interval) {
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
|
|
|
@ -248,6 +248,10 @@ public class Wave {
|
|||
blocks.add(block);
|
||||
FireBlast.removeFireBlastsAroundPoint(block.getLocation(), 2);
|
||||
}
|
||||
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(location);
|
||||
}
|
||||
// if (!blocks.contains(block)
|
||||
// && (Methods.isPlant(block) && block.getType() !=
|
||||
// Material.LEAVES)) {
|
||||
|
@ -432,6 +436,11 @@ public class Wave {
|
|||
new TempBlock(block, Material.ICE, (byte) 0);
|
||||
frozenblocks.put(block, block);
|
||||
}
|
||||
for(Block sound : frozenblocks.keySet()) {
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playWaterbendingSound(sound.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue