WaterWave now works with Passive, and doesn't create currents

WaterWave previously was not working with WaterPassive, now it does.
WaterWave was also removing the block of water that the user was using
as a source, which was causing currents to form in the water.
This commit is contained in:
nathank33 2014-09-09 22:10:19 -07:00
parent 86ce948fa0
commit d68a519fd7
2 changed files with 3 additions and 3 deletions

View file

@ -31,7 +31,7 @@ public class WaterPassive {
if (Methods.canBendPassive(player.getName(), Element.Water)) { if (Methods.canBendPassive(player.getName(), Element.Water)) {
if (WaterSpout.instances.containsKey(player) || EarthArmor.instances.containsKey(player)) { if (WaterSpout.instances.containsKey(player) || EarthArmor.instances.containsKey(player)) {
continue; continue;
} else if (ability == null || !AbilityModuleManager.shiftabilities.contains(ability)) { } else if (ability == null || !AbilityModuleManager.shiftabilities.contains(ability) || ability.equalsIgnoreCase("WaterWave")) {
if (player.isSneaking() && Methods.isWater(player.getLocation().getBlock())) { if (player.isSneaking() && Methods.isWater(player.getLocation().getBlock())) {
player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor)); player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor));
} }

View file

@ -118,8 +118,8 @@ public class WaterWave
currentLoc = origin.clone(); currentLoc = origin.clone();
if(Methods.isPlant(origin.getBlock())) if(Methods.isPlant(origin.getBlock()))
new Plantbending(origin.getBlock()); new Plantbending(origin.getBlock());
else //else
Methods.addTempAirBlock(origin.getBlock()); // Methods.addTempAirBlock(origin.getBlock());
} }