Fix EarthBlast using blocks outside range

Dynamic sourcing allowed earthblast to use blocks outside the prepare
range as a source
This commit is contained in:
kingbirdy 2015-08-04 01:01:35 -04:00
parent 0599d39da9
commit cde1efc78b

View file

@ -74,6 +74,9 @@ public class EarthBlast {
Block block = BlockSource.getEarthSourceBlock(player, range, ClickType.SHIFT_DOWN);
block(player);
if (block != null) {
if (block.getLocation().distance(player.getLocation()) > preparerange) {
return false;
}
sourceblock = block;
focusBlock();
return true;