What are the dud BlockCategories?

This commit is contained in:
Jesse Boyd
2018-08-14 11:00:44 +10:00
parent 76a55b7712
commit 1740c845d2
13 changed files with 40 additions and 31 deletions

View File

@ -58,7 +58,7 @@ public abstract class BlockBag {
fetchBlock(blockState);
} catch (OutOfBlocksException e) {
BlockState placed = blockState;// TODO BlockType.getBlockBagItem(id, data);
if (placed == null || placed.getBlockType() == BlockTypes.AIR) throw e; // TODO: check
if (placed == null || placed.getBlockType().getMaterial().isAir()) throw e; // TODO: check
fetchBlock(placed);
}

View File

@ -82,7 +82,7 @@ public class SurvivalModeExtent extends AbstractDelegateExtent {
@Override
public boolean setBlock(Vector location, BlockStateHolder block) throws WorldEditException {
if (toolUse && block.getBlockType() == BlockTypes.AIR) {
if (toolUse && block.getBlockType().getMaterial().isAir()) {
world.simulateBlockMine(location);
return true;
} else {
@ -92,7 +92,7 @@ public class SurvivalModeExtent extends AbstractDelegateExtent {
@Override
public boolean setBlock(int x, int y, int z, BlockStateHolder block) throws WorldEditException {
if (toolUse && block.getBlockType() == BlockTypes.AIR) {
if (toolUse && block.getBlockType().getMaterial().isAir()) {
world.simulateBlockMine(MutableBlockVector.get(x, y, z));
return true;
} else {