[GH-ISSUE #7416] Native mods: a mod's own structure types, with pieces placed from code (StructureType) #3230

Open
opened 2026-11-03 04:06:52 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Qwerner88880 on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7416

Originally assigned to: @Qwerner88880 on GitHub.

🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally.

Part of #4953 (it has no line for this yet).

The gap

A content mod can add data-driven structures today: structures, structure sets, template pools and processor lists, plus the structure-library shapes horizon-port-pack carries over (docs/mods.md). A structure whose shape is computed by code can't be added. That covers islands, spheres and noise-shaped landmarks, which NeoForge mods register as their own StructureType and StructurePieceType (Registries.STRUCTURE_TYPE, Registries.STRUCTURE_PIECE). Tech mods' boss arenas are built this way; Draconic Evolution's Chaos Islands are one example.

Proposal

  • A native mod names its own structure type. A structure JSON with "type": "<mod>:<name>" loads through the existing structure loader instead of failing the file. Placement, spacing, biomes and the structure set stay data, as today.
  • A hook point is called when a start of that type is generated: native_structure_start(type, data, chunk_pos, seed, &mut pieces). It returns the pieces' bounding boxes and the mod's data.
  • A hook point is called when each piece places its blocks in a chunk: native_structure_piece_place(type, piece, chunk_box, &mut writer). It writes through the bulk block-edit path (#5733), clipped to the chunk.
  • Starts and pieces are saved in the chunk like vanilla's, so /locate and the structure's bounding box keep working.

Each step is its own PR under 500 lines: the type id and loader; the start hook; the piece hook; saving.

Not in this

Jigsaw pools and data-driven pieces, which already work. Feature placement in biomes, done in #5502.

Originally created by @Qwerner88880 on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7416 Originally assigned to: @Qwerner88880 on GitHub. > 🤖 Filed by Qwerner88880's AI agent (Claude Code, Claude Opus 5.5), not by Qwerner88880 personally. Part of #4953 (it has no line for this yet). ## The gap A content mod can add data-driven structures today: structures, structure sets, template pools and processor lists, plus the structure-library shapes `horizon-port-pack` carries over (docs/mods.md). A structure whose shape is computed by code can't be added. That covers islands, spheres and noise-shaped landmarks, which NeoForge mods register as their own `StructureType` and `StructurePieceType` (`Registries.STRUCTURE_TYPE`, `Registries.STRUCTURE_PIECE`). Tech mods' boss arenas are built this way; Draconic Evolution's Chaos Islands are one example. ## Proposal - A native mod names its own structure type. A structure JSON with `"type": "<mod>:<name>"` loads through the existing structure loader instead of failing the file. Placement, spacing, biomes and the structure set stay data, as today. - A hook point is called when a start of that type is generated: `native_structure_start(type, data, chunk_pos, seed, &mut pieces)`. It returns the pieces' bounding boxes and the mod's data. - A hook point is called when each piece places its blocks in a chunk: `native_structure_piece_place(type, piece, chunk_box, &mut writer)`. It writes through the bulk block-edit path (#5733), clipped to the chunk. - Starts and pieces are saved in the chunk like vanilla's, so `/locate` and the structure's bounding box keep working. Each step is its own PR under 500 lines: the type id and loader; the start hook; the piece hook; saving. ## Not in this Jigsaw pools and data-driven pieces, which already work. Feature placement in biomes, done in #5502.
Author
Owner

@Qwerner88880 commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6581294239 --> @Qwerner88880 commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3230
No description provided.