EarthSmash & EarthBlast fixes (#516)

* Adds slabs to default earth lists, stops slabs from changing to stone when fired

* Fixes EarthSmash deleting sand / gravel blocks when riding EarthSmash into them
This commit is contained in:
Archie 2016-07-17 20:23:12 +01:00 committed by OmniCypher
parent 8b9d80d76a
commit 2c076b50da
3 changed files with 7 additions and 2 deletions

View file

@ -354,6 +354,7 @@ public class ConfigManager {
earthBlocks.add("NETHERRACK");
earthBlocks.add("QUARTZ_ORE");
earthBlocks.add("COBBLESTONE");
earthBlocks.add("STEP");
ArrayList<String> metalBlocks = new ArrayList<String>();
metalBlocks.add("IRON_BLOCK");

View file

@ -107,7 +107,11 @@ public class EarthBlast extends EarthAbility {
sourceBlock.setType(Material.RED_SANDSTONE);
} else {
sourceBlock.setType(Material.SANDSTONE);
}
}
} if (sourceBlock.getType() == Material.STEP) {
sourceBlock.setType(Material.STEP);
sourceType = Material.STEP;
} else if (sourceBlock.getType() == Material.STONE) {
sourceBlock.setType(Material.COBBLESTONE);
sourceType = Material.STONE;

View file

@ -399,7 +399,7 @@ 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()));