Mod browser icon support

This commit is contained in:
Anuken
2021-02-06 12:05:59 -05:00
parent 7e4ffe6a7d
commit 25d013b768
10 changed files with 98 additions and 44 deletions

View File

@@ -13,8 +13,9 @@ import java.io.*;
@SuppressWarnings("unchecked")
public class JsonIO{
private static CustomJson jsonBase = new CustomJson();
private static Json json = new Json(){
private static final CustomJson jsonBase = new CustomJson();
public static final Json json = new Json(){
{ apply(this); }
@Override
@@ -39,10 +40,6 @@ public class JsonIO{
}
};
public static Json json(){
return json;
}
public static String write(Object object){
return json.toJson(object, object.getClass());
}
@@ -69,7 +66,6 @@ public class JsonIO{
}
static void apply(Json json){
json.setIgnoreUnknownFields(true);
json.setElementType(Rules.class, "spawns", SpawnGroup.class);
json.setElementType(Rules.class, "loadout", ItemStack.class);