Wiki 9Minecraft Wiki 9Minecraft

How to Generate Multi-Piece Jigsaw Structures and Dungeons

Switching from Single Schematics to Template Pools

Instead of spawning a single static .nbt building, you can generate randomized structure clusters—such as sprawling dungeons, ruins, and custom villages—by using vanilla Minecraft's Jigsaw block and template pool system.

First, make sure your individual .nbt structure pieces contain configured Jigsaw blocks and are linked together by a template pool inside your datapack's worldgen/ directory.

Configuring the Spawner for Pools

Open your structure's <structure name>.json file inside the structure_spawners/ folder and edit the "template" object:

1. Change "type" from "single" to "pool". This instructs the spawner to pull from a worldgen/ template pool rather than looking for a single schematic.

2. Set "id" to the namespace:path location of your starting template pool.

3. Configure "maxDepth" with an integer value if you want to control how many jigsaw connections out from the starting piece the generator is allowed to branch. This setting is optional and defaults to 10 if omitted.

Note that the "followTerrain" setting is only relevant when type is set to single, so you do not need to include it when spawning a jigsaw pool.