Move the jigsaw commands and the structure importers onto the tooling api

Add PlatformStructures, the capability the structure importers read the platform through: templates, registered
structures and structure sets, jigsaw structures, template pools with their connectors, and a closable capture area.
The Bukkit host implements it in the plugin and takes over all reflection, the structure manager and the NMS calls; the
importers keep only their model-building logic and report through the api sender. CommandContext.platformStructures()
reaches it, ToolPlayer.targetBlock() lets a command read what the player looks at.

CommandJigsaw, JigsawStudioBridge, IrisStructureHandler, the Director import and capture of CommandStructure and the
modded stubs that explained the Bukkit workflow are replaced by the neutral jigsaw command tree in
core/structure/tooling, mounted by StructureModelModule. Import and capture are now jigsaw sub-commands.

The graph editor, the vanilla exporter and StructureIndexService speak api types: IrisObject hands out its contents as
BlockState and BlockEntityData, exports go below ToolPack.outputFolder(), and the index writes through ToolPack.edit.
The move lint is at 0 for the B2 set.
This commit is contained in:
piexel committed 2026-11-10 00:27:03 +01:00
1 parent 23c93e6e74
commit ae11b38093
82 files changed
+6529 -4789

No files matched your search

@@ -54,13 +54,14 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructureTemplatePool.Projection.RIGID
);
VillageImporter.PoolElementResolution resolution = VillageImporter.resolvePoolElement(towers);
PoolElementReader.PoolElementResolution resolution = PoolElementReader.resolvePoolElement(towers);
Map<String, Object> entry = VillageImporter.piecePoolEntry(
"qa/pillager_outpost/piece/minecraft/pillager_outpost/watchtower",
1
);
StructureLoss loss = VillageImporter.listElementFallbackLoss(
resolution,
resolution.listLevels(),
resolution.omittedElements(),
"minecraft:pillager_outpost/towers"
);
Map<String, Object> basePlatePiece = VillageImporter.pieceJson(
@@ -103,7 +104,7 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement waystone = StructurePoolElement
.legacy("dungeons_and_taverns:waystones/waystone_scaffold")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution resolution = VillageImporter.resolvePoolElement(waystone);
PoolElementReader.PoolElementResolution resolution = PoolElementReader.resolvePoolElement(waystone);
VillageImporter.PoolMemberNormalization normalization = VillageImporter.normalizePoolMember(
"dungeons_and_taverns:waystones",
"qa/pool/dungeons_and_taverns/waystones",
@@ -130,7 +131,7 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement orphan = StructurePoolElement
.legacy("test:orphan_house")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution resolution = VillageImporter.resolvePoolElement(orphan);
PoolElementReader.PoolElementResolution resolution = PoolElementReader.resolvePoolElement(orphan);
VillageImporter.PoolMemberNormalization normalization = VillageImporter.normalizePoolMember(
"test:orphan_pool",
"qa/pool/test/orphan_pool",
@@ -160,7 +161,7 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement start = StructurePoolElement
.legacy("test:air_start")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution resolution = VillageImporter.resolvePoolElement(start);
PoolElementReader.PoolElementResolution resolution = PoolElementReader.resolvePoolElement(start);
VillageImporter.PoolMemberNormalization normalization = VillageImporter.normalizePoolMember(
"test:start",
"qa/pool/test/start",
@@ -184,7 +185,7 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement inert = StructurePoolElement
.legacy("test:mixed_air_inert")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution resolution = VillageImporter.resolvePoolElement(inert);
PoolElementReader.PoolElementResolution resolution = PoolElementReader.resolvePoolElement(inert);
VillageImporter.PoolMemberNormalization normalization = VillageImporter.normalizePoolMember(
"test:mixed",
"qa/pool/test/mixed",
@@ -214,8 +215,8 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement nonAirElement = StructurePoolElement
.legacy("test:mixed_non_air_primary")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution allAirResolution = VillageImporter.resolvePoolElement(allAirElement);
VillageImporter.PoolElementResolution nonAirResolution = VillageImporter.resolvePoolElement(nonAirElement);
PoolElementReader.PoolElementResolution allAirResolution = PoolElementReader.resolvePoolElement(allAirElement);
PoolElementReader.PoolElementResolution nonAirResolution = PoolElementReader.resolvePoolElement(nonAirElement);
VillageImporter.PoolMemberNormalization allAir = VillageImporter.normalizePoolMember(
"test:mixed",
"qa/pool/test/mixed",
@@ -257,8 +258,8 @@ public class VillageImporterListPoolElementRuntimeContractTest {
StructurePoolElement nonAirElement = StructurePoolElement
.legacy("test:non_air_primary")
.apply(StructureTemplatePool.Projection.RIGID);
VillageImporter.PoolElementResolution allAirResolution = VillageImporter.resolvePoolElement(allAirElement);
VillageImporter.PoolElementResolution nonAirResolution = VillageImporter.resolvePoolElement(nonAirElement);
PoolElementReader.PoolElementResolution allAirResolution = PoolElementReader.resolvePoolElement(allAirElement);
PoolElementReader.PoolElementResolution nonAirResolution = PoolElementReader.resolvePoolElement(nonAirElement);
VillageImporter.PoolMemberNormalization allAir = VillageImporter.normalizePoolMember(
"test:primary",
"qa/pool/test/primary",