Fill Command Generator

Fill a region, build a hollow shell or replace selected blocks with one Java command.

Java

Command builder

From corner
To corner
Block

Generated command

Region size: 726 blocks

Mark the corners of your build

In Java Edition, open the debug screen with F3 and write down the block coordinates of two opposite corners. Enter the first set under From corner and the second under To corner. Both corners count, so a floor from X 20 to X 29 is ten blocks wide. Keep Y the same at both corners if you want one layer.

You can also build from where you stand. Leave the first corner at ~ ~ ~ and set the second to ~4 ~ ~4 for a five-by-five floor at your feet. Stand at the intended corner when you run the command. The same relative command covers a different spot if you move before running it.

Choose what stays inside the room

Pick your material under Block. If the block has a direction or another setting, you can choose it under Block states. Then set Old block handling. Outline draws the shell and leaves the inside as it is. Hollow also clears the inside, which is useful for an empty room but can remove things you wanted to keep.

To swap an old floor without changing the rest of the room, turn on Replace filter and choose its current material under Replace block. Pick the new material under Block. If you select oak planks for the floor filter, the command leaves other blocks in the region alone.

Run a small section first

Choose the release you play under Game version. Press Copy command and paste the result into Minecraft chat in a world with cheats enabled or on a server where you have permission. For a large build, start with a small section and check that the block and corners are right before filling the rest. If the region exceeds the world's block limit, split it across several commands.