mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-14 04:47:51 +00:00
Firebending Sounds
Most Firebending abilities will now have a sound, FireBurst sounds ridiculous at the moment.
This commit is contained in:
parent
35ea5bf194
commit
544b567e92
5 changed files with 23 additions and 1 deletions
|
@ -18,6 +18,7 @@ import java.util.Collection;
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
@ -127,6 +128,8 @@ import org.bukkit.entity.TNTPrimed;
|
|||
public class Methods {
|
||||
|
||||
static ProjectKorra plugin;
|
||||
|
||||
public static Random rand = new Random();
|
||||
|
||||
private static final ItemStack pickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
|
||||
|
||||
|
@ -1972,6 +1975,10 @@ public class Methods {
|
|||
loc.getWorld().playEffect(loc, Effect.MOBSPAWNER_FLAMES, 0, 15);
|
||||
}
|
||||
|
||||
public static void playFirebendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.FIRE, 1, 10);
|
||||
}
|
||||
|
||||
public static void playMetalbendingSound(Location loc) {
|
||||
loc.getWorld().playSound(loc, Sound.IRONGOLEM_HIT, 1, 10);
|
||||
}
|
||||
|
|
|
@ -159,6 +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);
|
||||
}
|
||||
location = location.add(direction.clone().multiply(speedfactor));
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.projectkorra.ProjectKorra.firebending;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
|
@ -24,6 +25,8 @@ import com.projectkorra.ProjectKorra.waterbending.WaterManipulation;
|
|||
|
||||
public class FireBlast {
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public static ConcurrentHashMap<Integer, FireBlast> instances = new ConcurrentHashMap<Integer, FireBlast>();
|
||||
private static double speed = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Speed");
|
||||
private static double pushfactor = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.FireBlast.Push");
|
||||
|
@ -164,7 +167,9 @@ public class FireBlast {
|
|||
private void advanceLocation() {
|
||||
location.getWorld().playEffect(location, Effect.MOBSPAWNER_FLAMES, 0, (int) range);
|
||||
location = location.add(direction.clone().multiply(speedfactor));
|
||||
|
||||
if (rand.nextInt(4) == 0) {
|
||||
Methods.playFirebendingSound(location);
|
||||
}
|
||||
}
|
||||
|
||||
private void ignite(Location location) {
|
||||
|
|
|
@ -73,6 +73,9 @@ public class FireJet {
|
|||
// player.setAllowFlight(canfly);
|
||||
instances.remove(player);
|
||||
} else {
|
||||
if (Methods.rand.nextInt(2) == 0) {
|
||||
Methods.playFirebendingSound(player.getLocation());
|
||||
}
|
||||
player.getWorld().playEffect(player.getLocation(), Effect.MOBSPAWNER_FLAMES, 1);
|
||||
double timefactor;
|
||||
if (AvatarState.isAvatarState(player) && isToggle) {
|
||||
|
|
|
@ -164,6 +164,10 @@ public class Fireball {
|
|||
private void fireball() {
|
||||
for (Block block : Methods.getBlocksAroundPoint(location, radius)) {
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.MOBSPAWNER_FLAMES, 0, 20);
|
||||
if (Methods.rand.nextInt(4) == 0) {
|
||||
Methods.playFirebendingSound(location);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (Entity entity : Methods.getEntitiesAroundPoint(location, 2 * radius)) {
|
||||
|
|
Loading…
Reference in a new issue