Minecraft – How to create a custom border using the same material as the world boundary

minecraft-commandsminecraft-java-edition

When you reach the edge of a world at around X/Z 29,999,984, you encounter a barrier that can only be passed through teleportation.

enter image description here

I would like to use them as a barrier around a PVP arena to keep all the players from wandering too far. However, it doesn't seem to be a normal block like barrier blocks are. The minecraft wiki page on the world boundary doesn't mention them having a block ID or really any other way to move and control them.

I've also tried pressing F3 to see if that would reveal what the boundary's ID is, but it just shows the block behind it.

enter image description here

So, is there any way to move the world boundary, or use the same material as the boundary with /fill and other commands?

Best Answer

Pretty easy:

/worldborder

You can set the diameter by /worldborder set <distance>. For example /worldborder set 5 results in this (a square of 5x5 blocks):

enter image description here

Moving the border is also possible by using /worldborder center <x> <z>, which will put the border around these coordinates.