FireBlast & Water's SelectRange fixes (#521)

* Fixed FireBlast's damage not respecting the config during the day

* Fixes leaves not using the correct select range
This commit is contained in:
Loony 2016-07-27 07:07:57 +01:00 committed by OmniCypher
parent 5eed58d9d4
commit 3150b34487
2 changed files with 3 additions and 1 deletions

View file

@ -189,7 +189,7 @@ public abstract class WaterAbility extends ElementalAbility {
Vector vector = location.getDirection().clone().normalize(); Vector vector = location.getDirection().clone().normalize();
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player); BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
Block testBlock = player.getTargetBlock(getTransparentMaterialSet(), range > 3 ? 3 : (int) range); Block testBlock = player.getTargetBlock(getTransparentMaterialSet(), (int) range);
if (bPlayer == null) { if (bPlayer == null) {
return null; return null;
} else if (isWaterbendable(testBlock.getType())) { } else if (isWaterbendable(testBlock.getType())) {

View file

@ -79,6 +79,8 @@ public class FireBlastCharged extends FireAbility {
this.range = getDayFactor(range); this.range = getDayFactor(range);
if (!player.getEyeLocation().getBlock().isLiquid()) { if (!player.getEyeLocation().getBlock().isLiquid()) {
start(); start();
} if (isDay(player.getWorld())) {
this.maxDamage = getDayFactor(maxDamage);
} }
} }