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