Batch 7 stage 1: jigsaw definitions from the module build

The jigsaw definitions, StructureResources and IrisDirection now come from IrisModule. Iris
registers iris:structure (StructureModule) with its own modules; iris:structure-model keeps the
validator and the locator and vanilla structure services. StructureResources lookups take the
pack's PackResources, so callers pass data.getPackResources(); the Bukkit plugin compiles against
the API for that. IrisRegistrant extends the module's KeyedResource, which holds the load key.
A structure's loot placement is StructurePlacing.lootPlacement. Studio maps an API object
reference (GeneratedObject) to Iris's object loader.
This commit is contained in:
piexel committed 2026-10-27 00:59:48 +01:00
1 parent c9e36761e4
commit 74b129e105
32 files changed
+112 -1181

No files matched your search

@@ -141,7 +141,7 @@ public final class ModdedStructureCommands {
return 0;
}
String key = keyRaw.trim();
IrisStructure structure = StructureResources.structure(data, key);
IrisStructure structure = StructureResources.structure(data.getPackResources(), key);
if (structure == null) {
IrisModdedCommands.fail(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_STRUCTURE_COMMANDS_NO_IRIS_STRUCTURE_THIS_PACK, MessageArgument.untrusted("key", key)));
return 0;
@@ -181,7 +181,7 @@ public final class ModdedStructureCommands {
return 0;
}
String key = keyRaw.trim();
IrisStructure structure = StructureResources.structure(data, key);
IrisStructure structure = StructureResources.structure(data.getPackResources(), key);
if (structure == null) {
IrisModdedCommands.fail(source, IrisLanguage.plain(ModdedCommandMessages.MODDED_STRUCTURE_COMMANDS_NO_IRIS_STRUCTURE_THIS_PACK_2, MessageArgument.untrusted("key", key)));
return 0;
@@ -227,7 +227,7 @@ public final class ModdedStructureCommands {
try {
Engine engine = IrisModdedCommands.engineFor(context.getSource().getLevel());
if (engine != null) {
return SharedSuggestionProvider.suggest(StructureResources.structureKeys(engine.getData()), builder);
return SharedSuggestionProvider.suggest(StructureResources.structureKeys(engine.getData().getPackResources()), builder);
}
} catch (Throwable ignored) {
}