Fix EarthSmash Bugs

This commit is contained in:
jedk1 2016-02-08 15:18:16 +00:00
parent d58267553e
commit 4cbd49519c
2 changed files with 5 additions and 1 deletions

View file

@ -75,7 +75,8 @@ public class EarthPassive {
return true;
}
return EarthAbility.isEarthbendable(player, block) || EarthAbility.isTransparent(player, block);
return (TempBlock.isTempBlock(block) && EarthAbility.isEarthbendable(TempBlock.get(block).getBlock().getType()))
|| EarthAbility.isEarthbendable(player, block) || EarthAbility.isTransparent(player, block);
}
public static boolean isPassiveSand(Block block) {

View file

@ -397,6 +397,9 @@ public class EarthSmash extends EarthAbility {
}
for (BlockRepresenter blockRep : currentBlocks) {
Block block = location.clone().add(blockRep.getX(), blockRep.getY(), blockRep.getZ()).getBlock();
if (block.getType().equals(Material.SAND) || block.getType().equals(Material.GRAVEL)) { //Check if block can be affected by gravity.
addTempAirBlock(block); //If so, set it to a temp air block.
}
if (player != null && isTransparent(block)) {
affectedBlocks.add(new TempBlock(block, blockRep.getType(), blockRep.getData()));
getPreventEarthbendingBlocks().add(block);