Terra Brush

In-game world editor: sculpt terrain with brushes, paint blocks and biomes, grow trees, build shapes, and paste .schem or .nbt schematics, with full undo. Vanilla players can join; only ops who edit need it on their client.

10 downloads Available UTILITY & QOL

Undo & History

Undo and redo

  • Each player has their own undo and redo history, kept on the server.
  • History size: up to undoHistorySize steps (default 50, range 0-1000). Both the undo list and the redo list are trimmed to this, oldest first.
  • Memory limit: maxHistoryChanges (default 2,000,000, range 10,000-50,000,000) is the total number of block and biome-cell changes one player's history can hold. When it's over, the oldest steps are dropped, but the newest step is always kept even if it's bigger than the limit.
  • What one step is: one edit from a tool (blocks and biome cells together). All dabs from one held mouse press (one stroke) merge into a single step if they happen in the same dimension. Edits marked "one undo step" in the UI (Path, Curve, Replace, Restore box, Auto-paint box and others) are one step each.
  • What is recorded: only blocks that really changed. Unchanged blocks are left out. For each block, the old and new states are kept, plus block entity data such as chest contents and sign text, so undo brings chests back with their items. Biome cells are recorded too.
  • Entities: mobs added or removed by the Mobs brush are part of the step. Undo removes the added mobs and brings back removed ones with the same id, so redo finds the same mob. Entities placed by a paste (item frames, paintings, armor stands, mobs) are placed after the blocks, so item frames have their wall. Entities removed by Cut belong to the same step.
  • Making a new edit clears the redo list.
  • Undo walks the blocks backwards. Undo and redo always reach every block, and they load chunks that were unloaded since.
  • Undo and redo are never blocked by protection: protected areas, spawn protection and claims don't apply, because they only put back your own changes.
  • While an edit, undo or redo of yours is still being applied, new undo, redo or clear requests are refused with "Still applying your last edit...".
  • Messages: "Undid %s (%s blocks)", "Redid %s (%s blocks)", "Nothing to undo", "Nothing to redo". The count is blocks + biome cells + mobs.
  • History is per player across dimensions. Each step remembers its dimension, and undo happens there. If that dimension no longer exists, the step is dropped and logged.
  • Saved to disk (if saveHistory = true, the default): world/terrabrush/history/<player UUID>.dat, one compressed NBT file per player. The file is written in the background so big histories don't stall the game. It is written to a temporary file first, then moved into place.
    • When it's saved: on logout; on every world save (autosave, /save-all), but only for players whose history changed; and when the server stops. On stop, the server waits up to 60 seconds for the files to be written.
    • What loads on login: your saved undo and redo lists, if you're allowed to use the editor and none of your history is still in memory. Blocks or biomes from mods that were removed since are skipped.
    • On logout, your history is freed from memory after it is saved. It stays in memory if one of your edits is still running.
    • With saveHistory = false, nothing is saved or loaded, so history lasts only until you log out.
  • Server stopping: every queued edit is finished first, all at once, so nothing is left half done. Then history is saved.
  • The History panel hint says the history is "Kept through restarts".

The History list

  • A panel list titled "History (%s)". When it's empty, it shows "Nothing to undo yet".
  • It shows the undo steps (newest first) and, above them, the steps you undid, which you can redo. Those are grey and marked with ↷. The latest undo step is marked ●.
  • Each row shows the step name (e.g. "Raise", up to 64 characters), the number changed (blocks + biome cells + mobs, with thousands separators), and how long ago: "just now", "N min ago", "N h ago", "N days ago", or "earlier" when the time is unknown.
  • Clicking an undo step undoes everything back to and including it. Clicking a redo step redoes everything up to it. The server takes at most 100 steps per click. The list shows at most 50 undo and 50 redo entries.
  • Clear history button: the first click arms it ("Click again to clear (can't be undone)"). A second click within 3 seconds clears every undo and redo step, and the saved copy too (it's saved as empty at the next save). The world stays as it is. Message: "History cleared: nothing to undo or redo". It's refused while one of your edits is still running.
  • The list is updated every time your history changes. It's only sent to clients that have the mod.

How big edits are applied

  • Edits go into one server-wide queue, oldest first. Each server tick applies at most maxBlocksPerTick block changes in total (default 20,000, range 100-1,000,000). Bigger edits are spread over several ticks so the server doesn't freeze. That one budget is shared by all players' edits, undos and redos.
  • Biome cells are applied all at once at the start of an edit. They count as about 1 budget unit per 16 cells (at least 1). Changed biomes are sent to nearby players the way vanilla /fillbiome does it.
  • Chunk loading: if a new edit reaches into unloaded chunks (e.g. a big paste past view distance), up to 4 chunks are loaded per tick, and the rest waits for the next tick. Undo and redo load whatever chunks they need.
  • How blocks are set: clients are updated, but there are no chain reactions. Sand and gravel don't fall, water doesn't start flowing, redstone doesn't fire, nothing drops items, containers don't spill, and blocks don't run their on-place behaviour. Neighbour shapes (fences, walls, snowy grass) still update.
  • Blocks outside the build height are skipped. So are blocks the brush mask rejects (only affect / never affect lists, min/max Y, slope limits; checked against the block that's there when the change is applied) and blocks in the protected blocks list.
  • What players see: if an edit takes more than a second, the editor gets an action-bar message every 20 ticks (1 second): "Applying %s... %s%%". When an edit that took more than one tick finishes: "%s: changed %s blocks". Small strokes that finish within one tick show no message.
  • Very large pastes don't hold millions of changes in memory. Each block is made from the clipboard as the queue reaches it.

Last updated November 21, 2026