Fixed treads on modded units

This commit is contained in:
Anuken
2022-09-20 15:27:11 -04:00
parent 3eb6061358
commit 7aaf5e477b
3 changed files with 10 additions and 7 deletions

View File

@@ -380,6 +380,11 @@ public class ContentParser{
}
}
//try to parse Rect as array
if(type == Rect.class && jsonData.isArray() && jsonData.size == 4){
return (T)new Rect(jsonData.get(0).asFloat(), jsonData.get(1).asFloat(), jsonData.get(2).asFloat(), jsonData.get(3).asFloat());
}
if(Content.class.isAssignableFrom(type)){
ContentType ctype = contentTypes.getThrow(type, () -> new IllegalArgumentException("No content type for class: " + type.getSimpleName()));
String prefix = currentMod != null ? currentMod.name + "-" : "";