mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 12:49:32 +00:00
Fix EarthSmash Bugs
This commit is contained in:
parent
d58267553e
commit
4cbd49519c
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue