25% off on first order withAPEX25

Este artículo aún no está disponible en el idioma seleccionado y se muestra en inglés.

Minecraft
Publicado el Nov 13, 2026

Minecraft Fill Command: Build and Clear Large Areas Fast

Your spawn area is a mess of trees and half-finished builds, and players join in an hour. Placing blocks one at a time won’t get you there. The fill command in Minecraft will: one line clears or builds a whole box of blocks at once. T...
Minecraft Fill Command: Build and Clear Large Areas Fast

Tabla de Contenidos

Compartir en
Ver progreso

Your spawn area is a mess of trees and half-finished builds, and players join in an hour. Placing blocks one at a time won’t get you there. The fill command in Minecraft will: one line clears or builds a whole box of blocks at once.

This guide covers the syntax, the six modes, the 32,768-block limit, and how to run /fill from your Apex server console. Every example is written for a live server, so each one stays under the limit.

 

The Quick Answer: /fill Syntax

The command takes two corners, a block, and an optional mode: /fill <from> <to> <block> [mode]. Each corner is an x y z position, and the whole box between them gets filled. For example, /fill 0 64 0 10 64 10 stone lays an 11 by 11 stone floor, 121 blocks in total. Leave the mode off and /fill uses replace.

In game, you need operator permission level 2 or higher to run it.

 

How to Get the Two Corner Coordinates

Press F3 to open the debug screen, then look at the block you want as your first corner. The Targeted Block entry on the right side shows that block’s x, y, and z. The middle number is height. Write the numbers down, walk to the opposite corner of your build area, and repeat.

Any opposite pair of corners works, and the order doesn’t matter. Both corner blocks are part of the fill.

In game, ~ means “the spot where the command runs,” so ~ ~1 ~ is one block above it. Relative coordinates are handy at your feet, but they’re a poor fit for a server job. Absolute numbers from F3 give the same result every time, so use them from the console too.

 

The Fill Modes Explained

The mode goes after the block and decides what happens to the blocks already in the box.

Mode What It Does Typical Server Use
replace (default) Swaps every block in the box for yours, with no drops. Add a filter to swap one block type only. Retexture a wall, swap lava for stone
destroy Breaks every block as if mined, so most of them drop as items. Clear a griefed build and keep the loot
hollow Fills only the outer shell; everything inside becomes air. Arena shells, rooms, empty buildings
outline Fills only the outer shell; the inside stays as it is. Walls around terrain or a finished build
keep Fills only the air blocks and leaves everything else alone. Fill gaps under a build without overwriting it
strict Places blocks without triggering block updates or shape updates. Placing a large build exactly as given

 
Strict arrived in Java 1.21.5, so older servers don’t have it. A filter goes right after replace, like /fill 0 60 0 20 70 20 air replace lava. It also accepts block tags, so replace #minecraft:leaves hits every leaf type at once.

Two traps catch people. Hollow turns everything inside the box into air, and chest contents drop as items. If you only want walls around something that already exists, use outline. And a box smaller than three blocks in any direction has no inside, so hollow and outline just act like replace.

For the full argument list, the Minecraft Wiki’s /fill page stays current.

 

The 32,768 Block Limit and How to Work Around It

/fill counts every block in the box, not just the ones that change. Hollow, outline, and keep all count the full volume. To work out the total, multiply the size on each axis, adding one to each difference because both corners are included:

(x2 - x1 + 1) x (y2 - y1 + 1) x (z2 - z1 + 1)

The default limit is 32,768 blocks. A 32 x 32 x 32 cube is exactly 32,768, which still passes. Go one block over and the command fails with a “Too many blocks in the specified area” error that shows the maximum and the size you asked for.

The usual fix is to split the job into slices. Say you want to clear a 64 x 20 x 64 area, which is 81,920 blocks. Four strips that are 16 blocks wide come to 20,480 blocks each:

  • /fill 0 64 0 15 83 63 air
  • /fill 16 64 0 31 83 63 air
  • /fill 32 64 0 47 83 63 air
  • /fill 48 64 0 63 83 63 air

 
You can also raise the limit with a game rule. On 1.21.11 and newer, the rule is max_block_modifications, so gamerule max_block_modifications 100000 allows a larger box. On 1.19.4 through 1.21.10, it’s called commandModificationBlockLimit. Before 1.19.4, the limit is fixed at 32,768. If you haven’t changed a game rule before, Apex’s gamerules guide shows the command format.

Run big jobs when few players are online. Splitting the job also gives you a chance to stop if the first slice looks wrong.

 

Run /fill From Your Apex Server Console

The console is the cleanest place to run a big job. If you aren’t an operator yet, it’s also where you fix that: Apex’s guide on how to op yourself walks through it.

  1. Take a manual backup first. Apex’s backup guide shows how to do it from the panel.
  2. Head towards your Apex server panel and start the server if it is not online.
  3. Press the “Console” button near the top left corner of your screen.
  4. Type the command in the text box and press Enter. Leave off the leading slash, for example fill 0 64 0 10 64 10 stone.
  5. Check the result. A successful run reports how many blocks changed, such as “Successfully filled 121 block(s)” when every block in the example changes.

 
Use absolute coordinates for both corners, which is what F3 gives you. Both corners also need to be in loaded chunks, so have a player standing near the area, or the command fails.

Why the backup first? /fill has no undo, and the panel’s automatic backup holds only one copy at a time. A manual backup right before the edit gives you a fresh restore point.

 

Server Build Examples

These three jobs come up on most servers. Each one lists its block count so you can see how close it sits to the limit.

 

Flatten a Spawn Area

Clear everything above the ground in a 41 x 41 area, then lay a new floor. This assumes your ground sits at y 64; change the numbers if yours doesn’t.

  • /fill -20 65 -20 20 79 20 air (41 x 15 x 41 = 25,215 blocks)
  • /fill -20 64 -20 20 64 20 stone_bricks (41 x 1 x 41 = 1,681 blocks)

 
Once the hub looks right, Apex’s spawn protection guide covers keeping players from changing it.

 

Build an Arena Shell

Hollow mode builds the walls, floor, and ceiling in one go and clears the inside.

  • /fill 100 64 100 139 83 139 stone_bricks hollow (40 x 20 x 40 = 32,000 blocks)

 
Then cut a doorway in the north wall with a second command: /fill 119 65 100 120 67 100 air (2 x 3 x 1 = 6 blocks).

 

Replace One Block Type

Someone dumped lava near spawn. Swap it for stone without touching anything else in the area:

  • /fill -25 60 -25 25 70 25 stone replace lava (51 x 11 x 51 = 28,611 blocks)

 

Fixing Common /fill Errors

Too many blocks in the specified area

The box is bigger than the limit. The message shows the maximum and the size you asked for. Split the job into slices or raise the game rule.

That position is not loaded

One of your corners sits in an unloaded chunk. Stand near the area and run the command again.

That position is out of this world!

A corner’s height is above or below the world’s limits. Double-check the y value.

Unknown block type

The block ID is misspelled. Write the full ID in lowercase and join words with the _ character, such as stone_bricks.

Unknown or incomplete command

You either left out part of the command or you lack permission to run it. Check the syntax first, then your operator level.

No blocks were filled

Nothing in the box would change. The area may already hold the block you chose, or your filter matched nothing.

 

Fill Command FAQ

Can I Undo a /fill Command?

Java Edition has no undo command. Stop the server and restore your backup, following Apex’s guide to restoring a backup.

How Many Blocks Can /fill Change at Once?

The default limit is 32,768 blocks per command, counted across the whole box. A game rule changes it on 1.19.4 and newer.

Who Can Run /fill on a Server?

Any player with operator permission level 2 or higher can run it. The server console can run it too.