mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
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:
parent
8b9d80d76a
commit
2c076b50da
3 changed files with 7 additions and 2 deletions
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in a new issue