DolphinStronghold9/ai-minecraft-modmaker

Games

Describe a build in a terminal, preview it as a ghost in Minecraft, then place it with one-step undo.

115
5
Java
MIT
new today

Mortar is a terminal agent that turns a sentence like "a stone watchtower on this hill" into blocks in a Minecraft world. It is aimed at Java Edition players who want to build without typing commands, and it fits singleplayer, LAN or servers where the player has operator rights.

What it does

The terminal program mortar plans the build, and a companion in your game reads the surrounding terrain, downloads the block changes and shows a see-through ghost that only you can see. You can walk around the preview, move or rotate it, then approve placement. Each turn starts with a snapshot and writes to an undo journal in .mortar/ inside the world folder, so /undo and /redo can step back through changes, including after a logout. Large builds are placed in batches under the game's block-change limit, which the author says keeps them from being cut off halfway. /materials lists needed blocks in stacks and raw materials, and /export saves the build as .litematic, .schem or .nbt.

A second use path writes datapacks instead of blocks: functions, advancements, recipes or loot tables. Mortar runs /reload, reads the log, fixes failures and retests, and the resulting pack can be removed with /undo like a build.

Choosing where you play

Each path needs a different companion, so this decides the setup:

  • Singleplayer or LAN on Java Edition 26.1–26.3: install the Fabric companion with Fabric Loader and Fabric API, then either build it from source or start from the portable Windows zip with Main.exe and mortar side by side (install details).
  • A Paper server you run: install the Paper plugin. You must be an operator. The ghost is sent to you only, as glass shaped like the build, so other players do not see it.
  • Minecraft on Rust via Horizon: no mod is needed; turn on Agent Control. There is no in-world ghost yet, so the preview opens in a separate window and placement asks Horizon to confirm.

Building the companions from source requires Rust 1.85+ and JDK 25 (build instructions). Bedrock Edition is not supported.

Models, permissions and privacy

The agent works out of the box with a free local model through Ollama, or with Claude, GPT or Gemini using your own key; the author states Mortar takes no cut and resells no tokens. It respects server permissions: if you could not run /fill, Mortar cannot either, and on servers you need to be an operator. A MORTAR.md file in the world folder can add rules such as a no-build zone near spawn or a palette restriction. The README says the only network calls go to the chosen model and that there is no telemetry, but from the project description alone that cannot be independently verified.

The project is MIT licensed and free (license).

The GitHub page reported 115 stars and 5 forks when this was written; HotRepo recorded it at #6 on its NEW-REPOSITORY board for Java with 115 total stars on 2026-10-31, with insufficient daily-board history to judge any trend. That is popularity context, not an evaluation of build quality.

Written by AI from the project's README, updated October 31, 2026. The project's own docs are the source of truth.