Minecraft Structure Block

You can find the structure block in the inventory (creative mode) or use the /give command (must be op)

Introduction

The structure block is currently limited to exporting 3D models which can be used in apps like PowerPoint, Paint3D and the Mixed Reality Viewer. It is also useful for helping to understand coordinate systems which we will explore in this lesson.

Using Structure Blocks

In order to use a structure block you must first obtain one. If you are in creative mode you can find it in the inventory using the search feature. If you are in survival the op can run a slash command to give it to players. The command below will give 10 structure blocks to each player that is in the world:

/give @a structure_block 10

You place a structure block as you would any block, but you should always place it on a corner of something you want to ‘capture’. There are size limits, but they are fairly large.

Place structure blocks on the corner so that the lines move towards the object you want to capture.

When you first place the structure block you will notice green and white lines forming a 5x5x5 cube. The lines typically point to the South (+Z) and East (+X) so you may need to adjust which corner you place it on. The outline also starts 1 block below the structure block which we will see on the next screen capture. When you right-click the structure block you will get the following screen:

Notice the 3 coloured lines for X (red), Y (green) and Z (blue)

The X, Y and Z values can be adjusted on this screen so that the bounding box encompasses the object you want to capture. When you change the values you will need to click on the part of the screen with the preview for it to update. You can also use your mouse to spin the object in the preview to ensure you’ve captured the correct amount.

Notice that there are 3 coloured lines on the bounding box preview: red (X), green (Y) and blue (Z). As you change these values the dimensions will change – they can also be negative. The starting point of the cube is the structure block, but you can also change this by modifying the ‘offset’ XYZ values. By default the Y offset is set to -1 which is why the bounding box starts 1 block below the structure block.

Adjust the X, Y and Z values and click the preview until you have captured the object.

In the screen capture above you can see I’ve adjusted the X and Z size values so that it captures the house, but the roof has been left out. You might do this on purpose so that your model shows the inside of your object more clearly. Next I will adjust the Y offset value (currently -1) and also the Y size to capture the full roof.

The object I want to capture is all above ground so I have changed the offset to zero and the Y size value.

Once you have finished adjusting the size and offset values and can see in the preview that the object you want to capture is contained within the bounding box we can now export the model for use outside of Minecraft.

Exporting Models

The Export button will ask you for a folder to create your model file in. The Downloads folder is a good option.

Once your file has been exported you can then open it with several programs. The Mixed Reality Viewer is the best option for computers running Windows 10. There are also online viewers like this one. Currently there is no way to import models into Minecraft Education Edition. Hopefully, this feature will be added soon.

What about Cloning structures?

Wouldn’t it be cool if we could copy and paste objects in Minecraft? There are a few steps here:

  1. First we need a way of selecting a 3D space that we want copy.
  2. Next we need to copy it into the computer memory.
  3. Finally, we need a way of pasting it at a new location.

You might be guessing that we could use the structure block and the bounding box for step 1. This is really convenient as we can use the features of the structure block to accurately select a 3D space using the preview window (bounding box). First we’ll need to import some code I’ve prepared:

https://makecode.com/_95qVV6Jjqafz
The basic commands in the cloning engine code

You must be an operator to use this code so please ensure you have been ‘opped’ before you attempt to use these commands. There have been some crashes when trying to clone huge objects – I recommend keeping the objects you clone fairly small (64 x 64 x 64 is the maximum – which is over 262,000 blocks in total).

Step 1 – Select starting point with the iron pickaxe

You will need to bet an iron pickaxe and iron shovel which you may notice in the code above trigger some code when we right-click them. Move your player to a corner of the object you want to clone then right-click the iron pickaxe. This should place a structure block right beneath your player. You may need to adjust the position of the structure block so that the bounding box moves towards the object you want to capture.

Make sure you use an iron pickaxe and have loaded and run the cloning engine code. You must also be an operator.

Step 2 – Set the size of the bounding box

Just like we did earlier you need to right-click the structure box and adjust the size values so that the bounding box includes everything you want to clone. You should also set the all the offset values to zero as the code assumes the starting point is at the exact location of the structure block. Once you have completed the size you need to remember the 3 numbers (x, y, z) for the next step.

Use the structure block to get the exact size of the object you want to clone.

Step 3 – Run the ‘end x y z’ command

The ‘end’ chat command needs the 3 numbers that represent the size of your bounding box you set in the structure block window. Remember to put a space between each number. If your object is 10 x 12 x 15 blocks then the end command will be:

end 10 12 15

You should see a message appear on the screen that tells you that the area is now copied into a slot number. You can actually repeat these 3 steps multiple times to select several different objects, but for now let’s move onto the final step.

Step 4 – Paste using the iron shovel

Here comes the fun part. To paste/clone the object you right-click the iron shovel and the code should create a copy of the object on the ground. If you selected multiple objects then it will randomly choose one and paste it. There is also a paste chat command if you want to paste from an exact slot. The parameter for the paste command is the slot number. So if you have multiple objects selected and want to paste the object in slot 1 use the following command:

paste 1
Use the iron shovel to clone the object from a random slot onto the ground below you. It’s a good idea to fly.

2 Comments

  1. Anonymous

    so cool

    Reply
  2. Chiara Gung

    I love minecraft

    Reply

Submit a Comment

Your email address will not be published.