Add a material to check if air is air, because there are now 3 types of air.

This commit is contained in:
Matthew Miller
2018-08-16 15:42:11 +10:00
parent c31161d068
commit bc5609114b
22 changed files with 65 additions and 33 deletions

View File

@ -57,7 +57,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
EditSession eS = session.createEditSession(player);
try {
BlockStateHolder applied = secondary.apply(pos.toVector());
if (applied.getBlockType() == BlockTypes.AIR) {
if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(pos.toVector(), secondary);
} else {
eS.setBlock(pos.getDirection(), secondary);
@ -77,7 +77,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
EditSession eS = session.createEditSession(player);
try {
BlockStateHolder applied = primary.apply(pos.toVector());
if (applied.getBlockType() == BlockTypes.AIR) {
if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(pos.toVector(), primary);
} else {
eS.setBlock(pos.getDirection(), primary);