mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
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:
1 parent
23c93e6e74
commit
ae11b38093
82 files changed
+6529
-4789
No files matched your search
@@ -1434,6 +1434,12 @@ It exists so the tool lives in a module and runs on every platform: a tool that
|
||||
its own widgets (VolmLib windows and scoreboards on Bukkit). Their text is `ToolText`: spans of a named colour
|
||||
(`TextColor`) and a few styles, so no colour codes or components cross the api, and the host maps the spans onto
|
||||
whatever its platform draws text with.
|
||||
- **The platform's structures are one capability.** Registries, resource managers and structure managers differ by
|
||||
platform and version, and some are reached only by reflection. `PlatformStructures` is the one door for the tools that
|
||||
import them, and answers in api types (`BlockState`, `BlockEntityData`, `ResourceId`), so an importer holds only
|
||||
model-building logic. Capturing a structure needs a scratch area that has to be removed, so it is a `CaptureArea` the
|
||||
tool closes, and not a call that leaves the area to the platform. A platform without the capability gives
|
||||
`CommandContext.platformStructures()` empty and the tool says so.
|
||||
- **A platform may not have it.** `ToolWorlds.open` then returns a failed future and `Sender.player()` is empty, so a tool
|
||||
tells its user instead of failing at class loading. The package is exposed to pack modules, unlike the platform
|
||||
packages below `com.volmit.tooling`.
|
||||
|
||||
Reference in new issue
Block a user