mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 20:19:06 +00:00
Connect up jigsaw pools with pieces
This commit is contained in:
@@ -283,7 +283,8 @@ public class IrisProject
|
||||
schemas.put(getSchemaEntry(IrisRegion.class, dm, "/regions/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisGenerator.class,dm, "/generators/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisStructure.class, dm, "/structures/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisStructurePiece.class, dm, "/structure-pieces/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisStructurePiece.class, dm, "/jigsaw-pieces/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisStructurePool.class, dm, "/jigsaw-pools/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisBlockData.class, dm, "/blocks/*.json"));
|
||||
schemas.put(getSchemaEntry(IrisLootTable.class, dm, "/loot/*.json"));
|
||||
settings.put("json.schemas", schemas);
|
||||
|
||||
@@ -393,9 +393,25 @@ public class SchemaBuilder
|
||||
definitions.put(key, j);
|
||||
}
|
||||
|
||||
fancyType = "Iris Structure Piece";
|
||||
fancyType = "Iris Jigsaw Piece";
|
||||
prop.put("$ref", "#/definitions/" + key);
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Structure Piece (use ctrl+space for auto complete!)");
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Jigsaw Piece (use ctrl+space for auto complete!)");
|
||||
}
|
||||
|
||||
else if(k.isAnnotationPresent(RegistryListStructurePool.class))
|
||||
{
|
||||
String key = "enum-reg-structure-pool";
|
||||
|
||||
if(!definitions.containsKey(key))
|
||||
{
|
||||
JSONObject j = new JSONObject();
|
||||
j.put("enum", new JSONArray(data.getStructurePoolLoader().getPossibleKeys()));
|
||||
definitions.put(key, j);
|
||||
}
|
||||
|
||||
fancyType = "Iris Jigsaw Pool";
|
||||
prop.put("$ref", "#/definitions/" + key);
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Jigsaw Piece (use ctrl+space for auto complete!)");
|
||||
}
|
||||
|
||||
else if(k.getType().equals(Enchantment.class))
|
||||
@@ -783,7 +799,7 @@ public class SchemaBuilder
|
||||
|
||||
else if(k.isAnnotationPresent(RegistryListStructurePiece.class))
|
||||
{
|
||||
fancyType = "List of Iris Structure Pieces";
|
||||
fancyType = "List of Iris Jigsaw Pieces";
|
||||
String key = "enum-reg-structure-piece";
|
||||
|
||||
if(!definitions.containsKey(key))
|
||||
@@ -796,7 +812,25 @@ public class SchemaBuilder
|
||||
JSONObject items = new JSONObject();
|
||||
items.put("$ref", "#/definitions/" + key);
|
||||
prop.put("items", items);
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Structure Piece (use ctrl+space for auto complete!)");
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Jigsaw Piece (use ctrl+space for auto complete!)");
|
||||
}
|
||||
|
||||
else if(k.isAnnotationPresent(RegistryListStructurePool.class))
|
||||
{
|
||||
fancyType = "List of Iris Jigsaw Pools";
|
||||
String key = "enum-reg-structure-pool";
|
||||
|
||||
if(!definitions.containsKey(key))
|
||||
{
|
||||
JSONObject j = new JSONObject();
|
||||
j.put("enum", new JSONArray(data.getStructurePoolLoader().getPossibleKeys()));
|
||||
definitions.put(key, j);
|
||||
}
|
||||
|
||||
JSONObject items = new JSONObject();
|
||||
items.put("$ref", "#/definitions/" + key);
|
||||
prop.put("items", items);
|
||||
description.add(SYMBOL_TYPE__N + " Must be a valid Jigsaw Pool (use ctrl+space for auto complete!)");
|
||||
}
|
||||
|
||||
else if(t.type().equals(Enchantment.class))
|
||||
|
||||
Reference in New Issue
Block a user