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

+8
View File
@@ -579,6 +579,14 @@ private void info(CommandContext context) {
naming both modules. A host without commands, such as a build check, accepts the registration and ignores it.
- `Sender.player()` is the sender as a `ToolPlayer` (see Tool worlds), empty for the console and on a platform without
tool worlds.
- `CommandContext.platformStructures()` is the platform's structures for the tools that turn them into pack resources,
empty on a platform that has none. `PlatformStructures` lists the registered structures and structure sets and the
loadable templates (`templates`, `template`, `structures`, `structureSets`), reads a registered jigsaw structure and a
template pool (`jigsaw` answering `JigsawStructureInfo`, `pool` answering `TemplatePool` with its members, fallback and
the connectors of each element), and generates structures that have no template in a throwaway area
(`supportsCapture`, `openCaptureArea`). A template or a captured structure is a list of `TemplateBlock` with
`BlockState` and `BlockEntityData`. A reader throws `StructureAccessException` when the platform's registries cannot be
read, and says whether asking again may help.
## Tool worlds