This commit is contained in:
Jesse Boyd 2017-06-20 10:32:21 +10:00
parent edd8dcc552
commit 2483b9fb5e
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -37,7 +37,7 @@ import java.util.Map;
import java.util.UUID;
public class StructureFormat implements ClipboardReader, ClipboardWriter {
private static final int MAX_SIZE = 32;
private static final int WARN_SIZE = 32;
private NBTInputStream in;
private NBTOutputStream out;
@ -160,16 +160,9 @@ public class StructureFormat implements ClipboardReader, ClipboardWriter {
int width = region.getWidth();
int height = region.getHeight();
int length = region.getLength();
if (width > MAX_SIZE) {
throw new IllegalArgumentException("Width of region too large for a .nbt");
if (width > WARN_SIZE || height > WARN_SIZE || length > WARN_SIZE) {
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);
// ignored: version / owner
MutableBlockVector mutable = new MutableBlockVector(0, 0, 0);