Gitea OpenCode Agent 3861cdfddf
Some checks failed
build / build (pull_request) Failing after 57s
build / build (push) Failing after 57s
Fix issue #12: Update README.md
2026-10-13 17:55:27 +00:00
2026-07-12 17:00:44 +02:00
2026-07-12 17:00:44 +02:00
2026-10-08 14:00:22 +02:00
2026-07-12 17:00:44 +02:00
2026-07-12 17:00:44 +02:00
2026-10-08 01:54:02 +02:00
2026-07-12 17:00:44 +02:00
2026-10-06 17:59:21 +02:00
2026-07-12 17:00:44 +02:00
2026-07-12 17:00:44 +02:00
2026-10-13 17:55:27 +00:00
2026-07-12 17:00:44 +02:00

codecraft

A Fabric mod for Minecraft that lets players write and run Lua code directly in-game — no datapacks, no external tooling, no server restarts.

Purpose

codecraft turns the game itself into a scripting environment. Open a code editor from inside Minecraft, write Lua against a curated game API, and press Run: the script executes on the server and changes the world. It is meant for players who want to automate, build, and experiment with code, and for servers that want to hand their community a safe, documented entry point into programming with Minecraft.

Features

  • In-game editor — open with J by default (rebindable): multi-file projects with a folder tree, tabs, syntax highlighting, autocomplete, snippets, find/replace, and themes.
  • Server-side Lua runtime — scripts run on the server thread through a pure-Java Lua interpreter (luajava); the project is stored on the server under config/codecraft/ as plain .lua files, so it can also be edited with external editors.
  • Game API — place and break blocks, query and spawn entities, manage items and inventories, scoreboards, HUD and boss bars, weather and time, and listen to events that keep running after a script finishes.
  • In-game documentation — the full Lua API reference is browsable inside the editor (Help → Lua API Documentation, or F1 on a function), with search.
  • Collaboration — live shared documents let multiple players edit the same file at once.
  • Terminal — an integrated terminal pane with a server-side shell.

Getting started

  1. Install the mod with Fabric Loader and the Fabric API.
  2. Join a server (or open a world) and press J to open the editor.
  3. Write your script in main and hit Run Script.

Scripts can place and remove blocks through the world table:

for y = 64, 67 do
    world.set_block(10, y, -3, "minecraft:cobblestone")
end

Documentation

The user-facing Lua API is documented in docs/lua-api.md, and the same reference is available in-game from the editor.

Requirements

Component Version
Minecraft 26.2
Fabric Loader ≥ 0.19.3
Fabric API 0.153.0+26.2
Java 25

Building from source

Requires JDK 25.

./gradlew build      # compile and build the mod jar (output in build/libs/)
./gradlew runClient  # launch a dev client with the mod loaded
./gradlew runDatagen # regenerate data (lang files)

For general Fabric development setup instructions, see the Fabric Documentation page related to the IDE that you are using.

License

This project is available under the CC0-1.0 license. Feel free to learn from it and incorporate it in your own projects.

Description
Fabric mod for coding inside Minecraft
Readme CC0-1.0 486 KiB
Languages
Java 100%