How to Spawn a Custom Jigsaw Structure In-Game with /spawnstructure
Point the Command at Your Structure
Once your structure is registered (via datapack or mod code), you can place it directly in the world without waiting for natural generation. Run /spawnstructure <structure_id> while standing where you want the structure to appear. The structure ID is the namespaced identifier you gave it, for example mymod:ancient_tower. The command reads the structure's jigsaw definition and assembles the full piece layout starting from the origin block you are targeting.
Positioning and Rotation
Use the optional arguments the command exposes to control placement. You can offset the spawn position along the X, Y, and Z axes so the structure does not clip into terrain or float. Rotation arguments let you face the structure in a chosen cardinal direction, which is useful when testing how a jigsaw's connectors line up with the surrounding world. If the structure appears buried, raise the Y offset; if pieces overlap oddly, check that your jigsaw's bounding box and connector directions are correct in the structure JSON.
Verify the Result
After spawning, inspect the assembled pieces. If some pieces are missing, the jigsaw pool likely failed to resolve a connector — check that every referenced pool and piece template exists and that element weights are valid. Re-run the command after each datapack reload to iterate quickly instead of regenerating chunks.