Lab
Mod Lab
Running at homeMy kid types an idea and a local model turns it into a Minecraft Bedrock add-on that installs in the game.
Mod Lab
Attempt 2 of 3a pickaxe that mines faster
- Specreply matches the schemapassed
- Checksitems exist, ids are freepassed
- Type-checkscript against the game typingspassed
- Compilepacks and texturesbuilt
Attempt 1 failed the type-check. The error went back to the model, and attempt 2 passed.
Your Quick Pickaxe is ready. Download it and open the file to install it in Minecraft.
Quick Pickaxe
A pickaxe that digs much faster than a normal one.
pickaxe2 attempts
9Mining speed
800Durability
1Stack size
Recipe
Give commands
/quick_pickaxeone/quick_pickaxe 8eight$ build "a pickaxe that mines faster"
attempt 1 safety passed
attempt 1 spec passed
attempt 1 cross-check passed
attempt 1 type-check 1 error
9:18 Property 'mineFaster' does not exist on type 'ItemStack'.
attempt 2 spec passed
attempt 2 cross-check passed
attempt 2 type-check passed
texture quick_pickaxe 16x16
packs Quick Pickaxe BP and RP
wrote Quick Pickaxe.mcaddon
How it works
- He types an idea and it gets read first. A word filter runs on the text, then the local model judges whether the idea is appropriate. The build prompt itself never asks for a last name, age, school, address or phone number.
- The model answers with a spec, not a finished mod. The reply has to match a zod schema: items, blocks, recipes, a script and a short explanation. Then code cross-checks it. Item references that are not real Minecraft items are rejected, and so is a command name that clashes with a built-in one.
- The script is type-checked, not trusted. The model’s JavaScript is checked in memory against the official @minecraft/server typings, so a call to something that does not exist in the game fails before it ever reaches Minecraft.
- The compiler writes the add-on. It generates the behavior pack and the resource pack, draws each 16x16 texture in code from a template and three colors, and zips everything into a single .mcaddon he can open to install.
- A failure gets another attempt. The error list goes back to the model for up to 3 attempts. If they run out, a plain-language explanation tells him what to try instead. The parent page keeps the log: every idea, the attempts it took, and anything that was blocked.
Built with
- Node and ExpressOne process serves the builder, the parent page and the download.
- OllamaRuns the local model. Builds can also go to my GPU job queue, where a faster node wins.
- zodThe schema for the spec, and the error messages sent back to the model.
- TypeScriptIts compiler API type-checks the model’s scripts against the @minecraft/server typings.
- fflateZips the two packs into the .mcaddon.
- pngjsWrites the generated 16x16 textures and pack icons as PNG files.
- vitestTests for the spec checks, the compiler and the prompt examples.
Decisions
- Type-check model code instead of trusting it. Small local models invent API calls that look right. Running the real typings over every script catches those before they reach a child’s game, where the only symptom would be an add-on that silently does nothing.
- Repair with the failure explained. A bare “try again” wastes an attempt. Each retry gets the exact error lines, so attempt 2 is a fix and not a reroll. When the attempts run out, the child gets a plain reason, because retyping the same idea would fail the same way.
- Draw textures in code. Each texture comes from a template, three colors and a 16x16 grid, rendered by the compiler. Nothing copyrighted ships in an add-on, and the model only has to name colors, not draw pixels.