Updated:

1. Get a structure block

/give @s minecraft:structure_block

It needs creative mode and operator rights, and it is not in the creative inventory.

2. Save a build (Java)

  1. Place the block near a corner of the build and right-click it.
  2. Set the mode to SAVE.
  3. Enter a name such as house.
  4. Set the relative position and structure size. Each side can be up to 48 blocks.
  5. Press SAVE.

The file is saved as generated/minecraft/structures/house.nbt in the world folder.

3. Load it (Java)

  1. Place another structure block where you want the copy and set it to LOAD.
  2. Enter the same name.
  3. Press LOAD once to show the outline and again to place it.

The load screen offers rotation and mirroring. Integrity below 1 removes random blocks for a ruined look.

4. Load with a command (Java)

/place template minecraft:house ~ ~ ~
/place template minecraft:house ~ ~ ~ clockwise_90
/place template minecraft:house ~ ~ ~ none left_right

See the place command.

5. Bedrock /structure

/structure save house ~ ~ ~ ~10 ~8 ~10
/structure load house ~20 ~ ~ 90_degrees

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.