mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Removes AutoSourcing from WaterSpout
This commit is contained in:
parent
a8f35df427
commit
464c39c804
2 changed files with 4 additions and 21 deletions
|
@ -396,7 +396,7 @@ public class ConfigManager {
|
||||||
config.addDefault("Abilities.Water.Surge.Description", "This ability has two distinct features. If you sneak to select a source block, you can then click in a direction and a large wave will be launched in that direction. If you sneak again while the wave is en route, the wave will freeze the next target it hits. If, instead, you click to select a source block, you can hold sneak to form a wall of water at your cursor location. Click to shift between a water wall and an ice wall. Release sneak to dissipate it.");
|
config.addDefault("Abilities.Water.Surge.Description", "This ability has two distinct features. If you sneak to select a source block, you can then click in a direction and a large wave will be launched in that direction. If you sneak again while the wave is en route, the wave will freeze the next target it hits. If, instead, you click to select a source block, you can hold sneak to form a wall of water at your cursor location. Click to shift between a water wall and an ice wall. Release sneak to dissipate it.");
|
||||||
config.addDefault("Abilities.Water.Surge.Wave.Radius", 3);
|
config.addDefault("Abilities.Water.Surge.Wave.Radius", 3);
|
||||||
config.addDefault("Abilities.Water.Surge.Wave.Range", 20);
|
config.addDefault("Abilities.Water.Surge.Wave.Range", 20);
|
||||||
config.addDefault("Abilities.Water.Surge.Wave.SelectRange", 12);
|
config.addDefault("Abilities.Water.Surge.Wave.SelectRange", 6);
|
||||||
config.addDefault("Abilities.Water.Surge.Wave.HorizontalPush", 1);
|
config.addDefault("Abilities.Water.Surge.Wave.HorizontalPush", 1);
|
||||||
config.addDefault("Abilities.Water.Surge.Wave.DynamicSourcing.Enabled", true);
|
config.addDefault("Abilities.Water.Surge.Wave.DynamicSourcing.Enabled", true);
|
||||||
config.addDefault("Abilities.Water.Surge.VerticalPush", 0.2);
|
config.addDefault("Abilities.Water.Surge.VerticalPush", 0.2);
|
||||||
|
@ -502,9 +502,6 @@ public class ConfigManager {
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.FlightTime", 2500);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.FlightTime", 2500);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Speed", 1.3);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.Speed", 1.3);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.SelectRange", 12);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.SelectRange", 12);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.AutoSourcing.Enabled", true);
|
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.AutoSourcing.Cooldown", 1500);
|
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.AutoSourcing.SelectRange", 5);
|
|
||||||
|
|
||||||
config.addDefault("Abilities.Water.WaterCombo.Enabled", true);
|
config.addDefault("Abilities.Water.WaterCombo.Enabled", true);
|
||||||
config.addDefault("Abilities.Water.WaterCombo.IceWave.Damage", 4);
|
config.addDefault("Abilities.Water.WaterCombo.IceWave.Damage", 4);
|
||||||
|
|
|
@ -47,11 +47,6 @@ public class WaterWave {
|
||||||
public static double ICE_WAVE_DAMAGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.WaterCombo.IceWave.Damage");
|
public static double ICE_WAVE_DAMAGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.WaterCombo.IceWave.Damage");
|
||||||
|
|
||||||
private static int selectRange = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.WaterSpout.Wave.SelectRange");
|
private static int selectRange = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.WaterSpout.Wave.SelectRange");
|
||||||
private static int autoSelectRange = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.WaterSpout.Wave.AutoSourcing.SelectRange");
|
|
||||||
private static boolean auto = ProjectKorra.plugin.getConfig().getBoolean("Abilities.Water.WaterSpout.Wave.AutoSourcing.Enabled");
|
|
||||||
private static long autocooldown = ProjectKorra.plugin.getConfig().getLong("Abilities.Water.WaterSpout.Wave.AutoSourcing.Cooldown");
|
|
||||||
|
|
||||||
private boolean isAuto;
|
|
||||||
|
|
||||||
private Player player;
|
private Player player;
|
||||||
private long time;
|
private long time;
|
||||||
|
@ -112,18 +107,13 @@ public class WaterWave {
|
||||||
if (origin == null) {
|
if (origin == null) {
|
||||||
removeType(player, AbilityType.CLICK);
|
removeType(player, AbilityType.CLICK);
|
||||||
|
|
||||||
Block block = BlockSource.getWaterSourceBlock(player, autoSelectRange, selectRange, ClickType.SHIFT_DOWN, auto, false, true, true, WaterMethods.canIcebend(player), WaterMethods.canPlantbend(player));
|
Block block = BlockSource.getWaterSourceBlock(player, selectRange, selectRange, ClickType.SHIFT_DOWN, false, false, true, true, WaterMethods.canIcebend(player), WaterMethods.canPlantbend(player));
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
if(instances.contains(this)) {
|
if(instances.contains(this)) {
|
||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (BlockSource.isAuto(block)) {
|
|
||||||
isAuto = true;
|
|
||||||
} else {
|
|
||||||
isAuto = false;
|
|
||||||
}
|
|
||||||
instances.add(this);
|
instances.add(this);
|
||||||
Block blockAbove = block.getRelative(BlockFace.UP);
|
Block blockAbove = block.getRelative(BlockFace.UP);
|
||||||
if (blockAbove.getType() != Material.AIR && !WaterMethods.isWaterbendable(blockAbove, player)) {
|
if (blockAbove.getType() != Material.AIR && !WaterMethods.isWaterbendable(blockAbove, player)) {
|
||||||
|
@ -289,12 +279,8 @@ public class WaterWave {
|
||||||
instances.remove(this);
|
instances.remove(this);
|
||||||
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
||||||
if (bPlayer != null) {
|
if (bPlayer != null) {
|
||||||
if (isAuto) {
|
|
||||||
bPlayer.addCooldown("WaterWave", autocooldown);
|
|
||||||
} else {
|
|
||||||
bPlayer.addCooldown("WaterWave", cooldown);
|
bPlayer.addCooldown("WaterWave", cooldown);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
revertBlocks();
|
revertBlocks();
|
||||||
for (BukkitRunnable task : tasks)
|
for (BukkitRunnable task : tasks)
|
||||||
task.cancel();
|
task.cancel();
|
||||||
|
|
Loading…
Reference in a new issue