Fixes #599
This commit is contained in:
parent
edd8dcc552
commit
2483b9fb5e
|
@ -37,7 +37,7 @@ import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class StructureFormat implements ClipboardReader, ClipboardWriter {
|
public class StructureFormat implements ClipboardReader, ClipboardWriter {
|
||||||
private static final int MAX_SIZE = 32;
|
private static final int WARN_SIZE = 32;
|
||||||
|
|
||||||
private NBTInputStream in;
|
private NBTInputStream in;
|
||||||
private NBTOutputStream out;
|
private NBTOutputStream out;
|
||||||
|
@ -160,16 +160,9 @@ public class StructureFormat implements ClipboardReader, ClipboardWriter {
|
||||||
int width = region.getWidth();
|
int width = region.getWidth();
|
||||||
int height = region.getHeight();
|
int height = region.getHeight();
|
||||||
int length = region.getLength();
|
int length = region.getLength();
|
||||||
if (width > MAX_SIZE) {
|
if (width > WARN_SIZE || height > WARN_SIZE || length > WARN_SIZE) {
|
||||||
throw new IllegalArgumentException("Width of region too large for a .nbt");
|
Fawe.debug("A structure longer than 32 is unsupported by minecraft (but probably still works)");
|
||||||
}
|
}
|
||||||
if (height > MAX_SIZE) {
|
|
||||||
throw new IllegalArgumentException("Height of region too large for a .nbt");
|
|
||||||
}
|
|
||||||
if (length > MAX_SIZE) {
|
|
||||||
throw new IllegalArgumentException("Length of region too large for a .nbt");
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, Object> structure = FaweCache.asMap("version", 1, "author", owner);
|
Map<String, Object> structure = FaweCache.asMap("version", 1, "author", owner);
|
||||||
// ignored: version / owner
|
// ignored: version / owner
|
||||||
MutableBlockVector mutable = new MutableBlockVector(0, 0, 0);
|
MutableBlockVector mutable = new MutableBlockVector(0, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue