Removed redundant null checks and fixed a potential file separator issue

This commit is contained in:
MattBDev
2021-05-11 20:01:11 -04:00
parent 277046d5c9
commit 4c1d0bc9a6
3 changed files with 6 additions and 9 deletions

View File

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