Fix WaterSpout & WaterWave

This commit is contained in:
jedk1 2016-02-08 13:05:06 +00:00
parent 16e546a5b8
commit 048a170e24
2 changed files with 5 additions and 2 deletions

View file

@ -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);

View file

@ -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