Fixed #7178 / Maps renamed

This commit is contained in:
Anuken
2022-07-15 19:26:23 -04:00
parent f6093c864f
commit 8d6cac39d0
9 changed files with 59 additions and 43 deletions
+11 -3
View File
@@ -287,11 +287,19 @@ public class JsonIO{
var exec = new MapObjectives();
// First iteration to instantiate the objectives.
for(var value = data.child; value != null; value = value.next){
//glenn why did you implement this in the least backwards compatible way possible
//the old objectives had lowercase class tags, now they're uppercase and either way I can't deserialize them without errors
if(value.has("class") && Character.isLowerCase(value.getString("class").charAt(0))){
return new MapObjectives();
}
MapObjective obj = json.readValue(MapObjective.class, value);
int pos = value.getInt("editorPos");
obj.editorX = Point2.x(pos);
obj.editorY = Point2.y(pos);
if(value.has("editorPos")){
int pos = value.getInt("editorPos");
obj.editorX = Point2.x(pos);
obj.editorY = Point2.y(pos);
}
exec.all.add(obj);
}
+1
View File
@@ -68,6 +68,7 @@ public class SaveIO{
getMeta(stream);
return true;
}catch(Throwable e){
Log.err(e);
return false;
}
}