Fix schem load

This commit is contained in:
Jesse Boyd
2019-11-01 23:48:52 +01:00
parent 09bb9c18ca
commit c2cb463dae
4 changed files with 11 additions and 5 deletions

View File

@ -251,7 +251,7 @@ public class SpongeSchematicReader extends NBTSchematicReader {
if (offsetX != Integer.MIN_VALUE && offsetY != Integer.MIN_VALUE && offsetZ != Integer.MIN_VALUE) {
origin = origin.subtract(BlockVector3.at(offsetX, offsetY, offsetZ));
}
if (blocksOut.getSize() != 0) {
if (blocksOut != null && blocksOut.getSize() != 0) {
try (FaweInputStream fis = new FaweInputStream(new LZ4BlockInputStream(new FastByteArraysInputStream(blocksOut.toByteArrays())))) {
if (clipboard instanceof LinearClipboard) {
LinearClipboard linear = (LinearClipboard) clipboard;
@ -286,7 +286,7 @@ public class SpongeSchematicReader extends NBTSchematicReader {
}
}
}
if (biomesOut.getSize() != 0) {
if (biomesOut != null && biomesOut.getSize() != 0) {
try (FaweInputStream fis = new FaweInputStream(new LZ4BlockInputStream(new FastByteArraysInputStream(biomesOut.toByteArrays())))) {
if (clipboard instanceof LinearClipboard) {
LinearClipboard linear = (LinearClipboard) clipboard;