AI Disclaimer
This project heavily relies on AI tooling and processes. Lot’s of token were spent on this project.
CC-Controller is a mapping prototype that connects programmable Minecraft devices to a Python backend and an Electron desktop viewer. It gives device observations persistent storage outside the game and includes a navigable 3D rendering component. The backend supports authenticated telemetry; frontend account integration is still needed before the current viewer can load protected map data.
Status: Mapping prototype · Stack: Python, FastAPI, SQLModel, SQLite, Lua, Electron, React, TypeScript, Three.js
The rendering component displays saved observations as coloured cubes. Frontend authentication and live updates remain unfinished.
Problem and scope
CC:Tweaked turtles can move, inspect blocks and run Lua programs inside Minecraft. CC-Controller records what they encounter so those observations can be explored through a desktop interface. Monitoring and controlling multiple turtles is the longer-term goal.
The map is built from device observations rather than Minecraft world files. Each device starts with manually entered coordinates and a facing direction, then tracks successful movements locally. This avoids world exports and GPS infrastructure, while making map accuracy dependent on the device’s position tracking.
Contribution and provenance
Most of the original implementation was generated using Claude Sonnet 4.5. My manual coding contribution was small. The technical details below describe the implemented system and its current limitations.
Architecture
The system spans three runtimes:
| Component | Responsibility | Technologies |
|---|---|---|
| In-game devices | Track position, inspect blocks and report state | Lua, CC:Tweaked |
| Backend | Authenticate devices, validate messages and persist observations | Python, FastAPI, SQLModel, SQLite |
| Desktop viewer | Fetch saved blocks and render a navigable 3D map | Electron, React, TypeScript, Three.js |
Lua movement wrappers update position after successful movement and inspect blocks in front, above and below the turtle. Observations travel over an authenticated WebSocket connection to the backend and are stored by world coordinates within the owner’s account map.
The viewer groups Three.js instanced cubes by block name and provides orbit, pan and zoom controls. Its loading path performs a single REST fetch at startup. The backend now requires account authentication, but the frontend account UI is deferred, leaving that loading path incomplete.
Implementation highlights
- Device pairing and credentials. Account owners request server-generated pairing codes. The installer exchanges a code for a locally stored device credential without requesting account credentials.
- Owner-scoped device identity. Backend-issued binding UUIDs identify devices independently of Minecraft computer IDs, which can overlap. Data access and command delivery are scoped to the owner.
- Connection recovery. Devices reconnect with capped backoff and send fresh registration and state. Offline block observations are dropped, and actions are not replayed.
- Runtime diagnostics. A read-only dashboard exposes device identity, API status and bounded network logs. A supervised shell is available through Ctrl+T, and the backend supports diagnostics uploads.
Verification and outcomes
Backend tests cover REST endpoints, validation, installer delivery and WebSocket behaviour. Six Lua harnesses cover installer and runtime behaviour. CI also includes Lua syntax checks and Ruff linting.
The implemented foundation supports authenticated device telemetry, persistent block observations and owner-scoped APIs. A 3D rendering component is also present, although the frontend authentication gap currently prevents the viewer from loading the protected map. Live map updates remain planned.
Limitations and next steps
The next integration step is completing frontend account and pairing flows, followed by live subscriptions so the viewer can update as devices explore.
Remote control remains a longer-term goal. The backend can deliver raw text commands, but the Lua reader deliberately ignores them and no remote executor exists.
Other limitations include stale records after blocks are removed, local position tracking without crash-safe physical movement guarantees, and an indefinite scanner without fuel or stuck-state recovery.
![[AI] CC-Controller](/images/covers/cc-tweaked.png)