Actually support nested json files in folders up to 2 subfolders

This commit is contained in:
Daniel Mills 2021-07-14 12:59:36 -04:00
parent ec47ca1983
commit a6acc30eea

View File

@ -365,16 +365,16 @@ public class IrisProject {
settings.put("json.maxItemsComputed", 30000);
JSONArray schemas = new JSONArray();
IrisDataManager dm = new IrisDataManager(getPath());
schemas.put(getSchemaEntry(IrisDimension.class, dm, "/dimensions/*.json"));
schemas.put(getSchemaEntry(IrisEntity.class, dm, "/entities/*.json"));
schemas.put(getSchemaEntry(IrisBiome.class, dm, "/biomes/*.json"));
schemas.put(getSchemaEntry(IrisRegion.class, dm, "/regions/*.json"));
schemas.put(getSchemaEntry(IrisGenerator.class, dm, "/generators/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPiece.class, dm, "/jigsaw-pieces/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPool.class, dm, "/jigsaw-pools/*.json"));
schemas.put(getSchemaEntry(IrisJigsawStructure.class, dm, "/jigsaw-structures/*.json"));
schemas.put(getSchemaEntry(IrisBlockData.class, dm, "/blocks/*.json"));
schemas.put(getSchemaEntry(IrisLootTable.class, dm, "/loot/*.json"));
schemas.put(getSchemaEntry(IrisDimension.class, dm, "/dimensions/*.json", "/dimensions/*/*.json","/dimensions/*/*/*.json"));
schemas.put(getSchemaEntry(IrisEntity.class, dm, "/entities/*.json", "/entities/*/*.json", "/entities/*/*/*.json"));
schemas.put(getSchemaEntry(IrisBiome.class, dm, "/biomes/*.json", "/biomes/*/*.json", "/biomes/*/*/*.json"));
schemas.put(getSchemaEntry(IrisRegion.class, dm, "/regions/*.json", "/regions/*/*.json", "/regions/*/*/*.json"));
schemas.put(getSchemaEntry(IrisGenerator.class, dm, "/generators/*.json", "/generators/*/*.json", "/generators/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPiece.class, dm, "/jigsaw-pieces/*.json", "/jigsaw-pieces/*/*.json", "/jigsaw-pieces/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawPool.class, dm, "/jigsaw-pools/*.json", "/jigsaw-pools/*/*.json", "/jigsaw-pools/*/*/*.json"));
schemas.put(getSchemaEntry(IrisJigsawStructure.class, dm, "/jigsaw-structures/*.json", "/jigsaw-structures/*/*/*.json", "/jigsaw-structures/*/*.json"));
schemas.put(getSchemaEntry(IrisBlockData.class, dm, "/blocks/*.json", "/blocks/*/*.json", "/blocks/*/*/*.json"));
schemas.put(getSchemaEntry(IrisLootTable.class, dm, "/loot/*.json", "/loot/*/*.json", "/loot/*/*/*.json"));
settings.put("json.schemas", schemas);
ws.put("settings", settings);