Wizard Toolbox Tool map

Fill Command Splitter

Enter two corners and a block. If the area is over the /fill limit, get it split into as few commands as possible, ready to paste.

Corner 1
Corner 2

Whole numbers, or ~ and ~5 for positions relative to where the command runs; use the same kind for an axis on both corners.

Mode

–Size
–Blocks
–Commands
–Fewest possible

Commands


    

Copying with /clone? It has the same limit. Split the source the same way, with the same corners here, and move each piece's destination by the same amount as its source is from the first corner.

Why /fill stops at 32,768

One /fill can change at most 32,768 blocks, a cube 32 on a side; past that the game answers "Too many blocks in the specified area". The size counts every block in the box, from one corner to the other inclusive, whatever the mode. Since Java Edition 1.19.4 the limit is a game rule, commandModificationBlockLimit, renamed max_block_modifications in 1.21.11; before 1.19.4, and in Bedrock Edition, it is fixed. If your world has a different limit, put it in the box. Checked against Java Edition 26.3.

How it splits

The area is cut into boxes that each stay within the limit, with no gaps and no block filled twice. It tries cutting along each axis into slabs, and the slabs into smaller boxes, and keeps the way that uses the fewest commands. The fewest possible is the number of blocks divided by the limit, rounded up; the split reaches it when the shape allows and says so when it cannot. A 100 by 100 by 100 cube is a million blocks and takes 31 commands.

Hollow and outline

A split hollow or outline box cannot just be hollowed piece by piece, since each piece would get walls of its own inside the shape. So the shell is split on its own: the floor, the ceiling and the four walls are filled with your block, and for hollow the inside is filled with air. Keep, destroy and replace (with or without the block to replace) split as they are.

Using the commands

With the slash, paste them one at a time in chat, or put them in a row of chain command blocks, one each; no data pack needed. Without the slash, save them as a .mcfunction file in a data pack and run it with /function, which runs them all at once. If you are allowed to change game rules, raising the limit for one big command is quicker; the box under the commands writes that out. The chunks you fill must be loaded, so stand near the area or use /forceload for big ones.

Questions

Is the limit the same in Bedrock Edition?

Bedrock also stops one /fill at 32,768 blocks, and has no game rule to change it, so pick Bedrock Edition and the limit stays put. Its /fill takes block states in square brackets with quotes, like ["facing"="north"], which differs from Java; plain block names work the same in both.

Why is the fewest possible lower than the commands I get?

Boxes have to fit the shape exactly. When the area does not divide well, some boxes come out smaller than the limit, so one or two more commands are needed than the volume alone suggests. The split here is often at the fewest, and close when it is not.

Can I set the limit to anything?

In Java Edition 1.19.4 and later, yes, with the game rule, up to the largest whole number the game holds. Very large fills can freeze the server for a while or run out of memory, so going in pieces is safer on a busy server.

Does /fill work in unloaded chunks?

No. Every block in the area has to be in a loaded chunk, and blocks above or below the world's height limits cannot be set, from y −64 to 319 in the Overworld.

Worked out in this page, on your device · nothing is sent anywhere

NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.