check length, not null

This commit is contained in:
Jesse Boyd 2019-07-17 05:28:55 +10:00
parent b3e11d2094
commit 75f059fdc5
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -184,7 +184,7 @@ public class SpongeSchematicReader extends NBTSchematicReader {
}
int[] pos = value.getIntArray("Pos");
int x,y,z;
if (pos == null) {
if (pos.length != 3) {
System.out.println("Invalid tile " + value);
if (!value.containsKey("x") || !value.containsKey("y") || !value.containsKey("z")) {
return;