Minecraft – How to build wall with Minecraft fill command and caret notation

minecraft-bedrock-editionminecraft-commands

I would like to build a 10 x 20 wall (10 blocks long, 20 blocks high) in front of the user's player.

I tried to use the following command –

fill ^0 ^1 ^1 ^1 ^20 ^10 stone 

But in result, I get 'filled 892 blocks'. What is wrong with my command?

I ran the command second time, it is 592 blocks now –
592 blocks image

Best Answer

Here is the problem with your command. GeoGebra Drawing Let's say you run the command while facing the solid green line shown on the page. On a computer, that's where your crosshairs are (so the green line represents the line segment between your head and your crosshairs)

Now, when facing straight, and not up or down, the crooked lines would align with the axes shown in the image. But when you are not facing straight forward, the direction of forward, backward, up, and down will change.

That means that ^0 ^1 ^1 will reference a point one unit along the FORWARD line, and one unit right along the red axis. This means that diagonal movements are allowed, which means that forward will mean slightly up as well.
It gets even worse with the second set of coordinates. You entered: ^1 ^20 ^10. This means one block right. Not a problem, but when you then do 20 blocks upwards, it means 20 blocks on the UP line in the picture. If you are facing the same way, it means slightly backwards as well!

In Java Edition, a fix exists, by using the rotated subcommand of the /execute command. Here is a command that would work in Java Edition:

/execute rotated 0.0 0.0 run fill ...

Unfortunately, this fix does not exist in Bedrock Edition.

I understand that this may be confusing to understand. If you require further explanation, just comment below! Either way, I hope this answer has shown you the dangers of diagonal movements with caret ^ notation.