4. Absorb mcwb into mciwb#
Date: 2026-11-30
Status#
Accepted. Supersedes the parts of 3. Keep mcipc for RCON, take block identifiers from mcwb that are about mcwb.
Context#
mcwb was meant to be the geometry layer under mciwb. It no longer split cleanly from it:
mciwb’s builders used mcwb only for its types (
Vec3,Volume,Item,Direction) andget_block.Placerwrites its own commands.mciwb’s
Schematicandmciwb.anvilhad replaced mcwb’sBlocks,graband JSON item lists.Nothing but mciwb used mcwb.
Keeping it as a separate package cost a release step, a version pin
(MINECRAFT_VERSION had to match), a second docs site and a git dependency, which
PyPI rejects.
mcwb is GPL-3.0-or-later and mciwb is Apache-2.0. At the pinned commit (1f2c017),
221 of mcwb’s lines were by authors other than mciwb’s owner, mostly in Vec3 and the
profile extruder. The owner can relicense their own code, but not those lines.
Decision#
Move mcwb’s code into mciwb and drop the
mcwbdependency. mcipc stays, as in ADR 3.mciwb.geometry:Vec3,Direction,Anchor3,Planes3d,Volume, and theRow,ProfileandCuboidtypes.mciwb.item:ItemandMINECRAFT_VERSION, generated byscripts/generate_items.py.mciwb.shapes:polygonand the profile helpers.mciwb.cuboids:Blocks,grab,get_block,save_itemsandload_items. This module is frozen:Schematicis its successor.
mciwb stays Apache-2.0. The owner’s code moves across as it is. The other authors’ lines are not copied: they are rewritten clean-room.
One agent read the original and wrote a behaviour spec that holds no code.
A second agent, which never saw the original, wrote the replacements from the spec.
A differential test runs both versions on the same inputs and shows that they behave the same. An independent verifier checked the result.
Drop
make_tunneland the helpers that only it used (offsets,normalize,get_direction,Anchor).polygonkeeps a private_extrude.Placerand the builders cover whatmake_tunnelwas used for.Every other name in
mciwb.importsstays, so scripts that import from there do not change.
Consequences#
One package, one release and one docs site. mciwb can be published to PyPI again, because it has no git dependency.
When a new Minecraft release adds blocks, run
scripts/generate_items.pyin mciwb. A unit test checks thatMINECRAFT_VERSIONmatches the server image.The rewritten code keeps the behaviour of the original, including its quirks (for example,
Vec3has no reflected operators, so1 + vecraisesTypeError). Changes to that behaviour are separate issues.Some of
Vec3’s one-line methods read almost the same as the original, because each is the only natural way to write behaviour that the spec fully determines.Scripts that call
make_tunnelmust change. Scripts that importmcwbdirectly switch tomciwb.imports.The mcwb repository is archived, with a pointer to mciwb.