Skip to content

Angais/minedit

Repository files navigation

Minedit

Minedit is an experimental NeoForge mod for building and editing Minecraft structures with OpenRouter models.

Select a footprint with a stick, describe what you want, and Minedit asks a model to generate compact builder code that places blocks in the selected area. It also supports editing existing builds with compact line-aware patches.

Status and Risk

Minedit is a work in progress. Expect things to break.

This mod sends prompts to OpenRouter using the API key you configure. Depending on your OpenRouter account, model, and usage, requests may cost money. You are responsible for all usage and charges caused by your API key. Use this mod at your own risk. The author is not responsible for unexpected costs, world changes, broken builds, or other side effects.

Your OpenRouter API key is stored in plaintext in your Minecraft game directory at config/minedit.properties. It is not stored per-world. Do not share this file, screenshots of it, modpacks containing it, or support logs that include it.

Back up worlds before testing large builds or edits.

Requirements

  • Minecraft 26.1.2
  • NeoForge 26.1.2.73
  • Java 25 for development/building
  • An OpenRouter API key

Installation

You can either download a prebuilt jar from the GitHub Releases page or build it yourself.

Download a Release

  1. Download the latest jar from the Minedit releases page.

  2. Copy the jar into your Minecraft mods folder.

  3. Start the NeoForge profile.

Build from Source

  1. Build the jar:

    ./gradlew build
  2. Copy the jar from build/libs/ into your Minecraft mods folder.

  3. Start the NeoForge profile.

Basic Use

  1. Set your OpenRouter key:

    /apikey <your-openrouter-key>
  2. Optionally choose a model:

    /model openai/gpt-5.5
  3. Select two X/Z footprint corners by right-clicking blocks with a stick.

  4. Build something:

    /build small stone watchtower with a peaked roof

Minedit uses the selected X/Z area as the footprint. Height is not capped by the selection.

Examples

Model output depends on the model, effort setting, selected footprint, and surrounding world state. These examples show one generated build and three follow-up edits.

Build generation:

/build a cute house

Generated cute house

Edit or quick edit:

/edit quick make the walls red please

Quick edit changing the walls red

Edit or quick edit:

/edit quick can you please change the wood for stone? a cool one

Quick edit changing wood details to stone

Edit or quick edit:

/edit quick don't really like those plants outside, can you remove them?

Quick edit removing outside plants

Editing

Use /edit to modify the selected area based on its current blocks:

/edit make the roof steeper and add windows

Use quick edit for small targeted patches:

/edit quick remove the flower and change the oak planks to spruce

Quick edit uses a compact line-aware representation of the current build, so models can emit small patches like api.replaceLine(...), api.clearLine(...), api.set(...), or api.fill(...) instead of rebuilding the whole structure.

Settings Commands

Set the normal build/edit model:

/model <openrouter-model-id>

Default model:

openai/gpt-5.5

Set normal reasoning effort:

/effort none
/effort low
/effort medium
/effort high
/effort xhigh

Default normal effort:

medium

Set quick edit reasoning effort:

/edit set quickeffort low

Default quick edit effort:

low

Settings are saved in config/minedit.properties. The OpenRouter API key in that file is plaintext and belongs to the whole Minecraft game directory/profile, not a single world. If you used an older build, Minedit will try to read the legacy config/aibuilder.properties file.

Reset Commands

Undo the last generated build/edit for your player:

/reset build

Clear the current selection:

/reset selection

Debug Files

When a model response fails, Minedit writes debug files to:

config/minedit-debug/

Useful files:

  • last-prompt.txt
  • last-response.txt
  • last-build.js

Notes on Generated Builds

Minedit prompts models to avoid common Minecraft placement problems such as unsupported plants, inverted roofs, stair orientation mistakes, roof gaps, and fragile blocks without support. It also checks Minecraft block survival rules before placing blocks, so unsupported fragile blocks may be skipped.

Model output is still imperfect. Use /reset build and world backups while testing.

Credits and Third-Party Technology

  • Built with the NeoForge MDK template. The template files are MIT licensed by the NeoForged project; see TEMPLATE_LICENSE.txt.
  • Uses NeoForge for Minecraft mod loading and APIs.
  • Bundles Mozilla Rhino 1.8.0 as the JavaScript runtime through NeoForge Jar-in-Jar. Rhino is licensed under the Mozilla Public License 2.0: https://www.mozilla.org/MPL/2.0/
  • Uses OpenRouter's OpenAI-compatible chat completions API.

About

AI building and editing for Minecraft

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages