Fix plotsquared schematic hook

This commit is contained in:
Jesse Boyd
2019-04-01 21:30:21 +11:00
parent 49e3102779
commit 6e6a3f9035
6 changed files with 136 additions and 31 deletions

View File

@ -216,12 +216,12 @@ public class SpongeSchematicReader extends NBTSchematicReader {
});
streamer.readFully();
if (fc == null) setupClipboard(length * width * height, uuid);
else fc.setDimensions(BlockVector3.at(width, height, length));
fc.setDimensions(BlockVector3.at(width, height, length));
BlockVector3 origin = min;
CuboidRegion region;
if (offsetX != Integer.MIN_VALUE && offsetY != Integer.MIN_VALUE && offsetZ != Integer.MIN_VALUE) {
origin = origin.subtract(BlockVector3.at(offsetX, offsetY, offsetZ));
region = new CuboidRegion(min, min.add(width, height, length).subtract(BlockVector3.ONE));
region = new CuboidRegion(origin, origin.add(width, height, length).subtract(BlockVector3.ONE));
} else {
region = new CuboidRegion(min, min.add(width, height, length).subtract(BlockVector3.ONE));
}

View File

@ -91,7 +91,6 @@ public class SpongeSchematicWriter implements ClipboardWriter {
if (length > MAX_SIZE) {
throw new IllegalArgumentException("Length of region too large for a .schematic");
}
//<<<<<<< HEAD
// output
final DataOutput rawStream = outputStream.getOutputStream();
outputStream.writeLazyCompoundTag("Schematic", out -> {