Update Upstream

40ded93 Fix loading legacy invalid blocks
This commit is contained in:
NotMyFault 2021-07-06 13:13:54 +02:00
parent 22f11abce8
commit a183425642
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -249,7 +249,10 @@ public class MCEditSchematicReader extends NBTSchematicReader {
int index = y * width * length + z * width + x;
BlockVector3 pt = BlockVector3.at(x, y, z);
BaseBlock state = Optional.ofNullable(tileEntityBlocks.get(pt))
.orElseGet(() -> getBlockState(blocks[index], blockData[index]).toBaseBlock());
.orElseGet(() -> {
BlockState blockState = getBlockState(blocks[index], blockData[index]);
return blockState == null ? null : blockState.toBaseBlock();
});
try {
if (state != null) {