mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-01-08 07:57:16 +00:00
Fix WaterSpout & WaterWave
This commit is contained in:
parent
16e546a5b8
commit
048a170e24
2 changed files with 5 additions and 2 deletions
|
@ -552,6 +552,7 @@ public class ConfigManager {
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Particles", false);
|
config.addDefault("Abilities.Water.WaterSpout.Particles", false);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Particles", false);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.Particles", false);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Enabled", true);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.Enabled", true);
|
||||||
|
config.addDefault("Abilities.Water.WaterSpout.Wave.AllowPlantSource", true);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Radius", 3.8);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.Radius", 3.8);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.WaveRadius", 1.5);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.WaveRadius", 1.5);
|
||||||
config.addDefault("Abilities.Water.WaterSpout.Wave.SelectRange", 6);
|
config.addDefault("Abilities.Water.WaterSpout.Wave.SelectRange", 6);
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class WaterSpoutWave extends WaterAbility {
|
||||||
private boolean iceWave;
|
private boolean iceWave;
|
||||||
private boolean iceOnly;
|
private boolean iceOnly;
|
||||||
private boolean moving;
|
private boolean moving;
|
||||||
|
private boolean plant;
|
||||||
private int progressCounter;
|
private int progressCounter;
|
||||||
private long time;
|
private long time;
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
|
@ -62,6 +63,7 @@ public class WaterSpoutWave extends WaterAbility {
|
||||||
this.charging = false;
|
this.charging = false;
|
||||||
this.iceWave = false;
|
this.iceWave = false;
|
||||||
this.iceOnly = false;
|
this.iceOnly = false;
|
||||||
|
this.plant = getConfig().getBoolean("Abilities.Water.WaterSpout.Wave.AllowPlantSource");
|
||||||
this.radius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.Radius");
|
this.radius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.Radius");
|
||||||
this.waveRadius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.WaveRadius");
|
this.waveRadius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.WaveRadius");
|
||||||
this.animationSpeed = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.AnimationSpeed");
|
this.animationSpeed = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.AnimationSpeed");
|
||||||
|
@ -112,7 +114,7 @@ public class WaterSpoutWave extends WaterAbility {
|
||||||
if (type == AbilityType.CLICK) {
|
if (type == AbilityType.CLICK) {
|
||||||
if (origin == null) {
|
if (origin == null) {
|
||||||
removeOldType(player, AbilityType.CLICK);
|
removeOldType(player, AbilityType.CLICK);
|
||||||
Block block = getWaterSourceBlock(player, selectRange, false);
|
Block block = getWaterSourceBlock(player, selectRange, plant);
|
||||||
|
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
remove();
|
remove();
|
||||||
|
@ -439,7 +441,7 @@ public class WaterSpoutWave extends WaterAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSneakAbility() {
|
public boolean isSneakAbility() {
|
||||||
return true;
|
return this.isIceWave() ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue