How github-zero123/mcdevtool works
MCDevTool is a Windows development toolkit for offline testing of 网易我的世界 Mods and maps. The main workflow is to run mcdk from a project, configure and prepare a test world with selected packs, launch the game, then refresh code or assets while developing. Separate capabilities provide MCP-based automation and runtime inspection, window controls, and profiling. The README documents the major product flows; sampled source is limited, so some links reflect documented behavior rather than inspected call sites.
Main entry points: mcp_tool_definitions.cpp MCP tool definitions · application.cpp Application flow · game_environment.cpp Game environment · mcp_server.cpp MCP client
Components 32
CLI orchestration
- mcdk command
tools/mcdk/main.cpp - Application flow
tools/mcdk/src/application.cpp - Configuration
tools/mcdk/src/config.cpp - Game environment
tools/mcdk/src/game_environment.cpp
World preparation
- World project
tools/mcdk/src/world_project.cpp - World setup
src/level.cpp - Pack mounting
src/addon.cpp
Live development
- Mod hot reload
tools/mcdk/src/hotreload.cpp - Asset reload
tools/mcdk/src/jsonui_reload_support.cpp - Debug MOD
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/modMain.py - Client loader
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Client.py - Server loader
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Server.py - Shared loader support
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/SharedRes.py
Automation and inspection
- MCP client
tools/mcdk/src/mcp_server.cpp - MCP tool definitions
tools/mcdk/src/mcp_tool_definitions.cpp - Log access
tools/mcdk/src/log_buffer.cpp - Code execution
tools/mcdk/src/ipc_code_execution.cpp - JSON UI debugger
tools/mcdk/src/jsonui_debugger.cpp - Window capture
src/window_capture.cpp - Window input
src/window_input.cpp - Profiler service
tools/mcdk/src/performance/profiler_service.cpp - Profiler types
tools/mcdk/include/mcdk/performance/profiler_types.hpp
Runtime components
- MCP protocol
libs/cpp-mcp/include/mcp_message.h - MCP client API
libs/cpp-mcp/include/mcp_client.h - MCP transports
libs/cpp-mcp/src/mcp_stdio_client.cpp - HTTP transport
libs/cpp-mcp/common/httplib.h - Base64 support
libs/cpp-mcp/common/base64.hpp - NBT data
libs/nbt/include/nbt-c/NBT.h - Input API
include/mcdevtool/window_input.h - Loader utilities
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/IN.py
Other components
- Mod developer
- Minecraft game
Connections 32
- Mod developer → mcdk command: runs
README.md - mcdk command → Application flow: starts
- Application flow → Configuration: loads settings
- Application flow → Game environment: prepares runtime
- Game environment → World project: detects project
README.md - World project → World setup: deploys map
README.md - World project → Pack mounting: mounts packs
README.md - Application flow → Minecraft game: launches
README.md - Pack mounting → Minecraft game: loads packs
README.md - Game environment → Mod hot reload: enables refresh
README.md - Mod hot reload → Minecraft game: refreshes mods
README.md - Asset reload → Minecraft game: reloads assets
README.md - Debug MOD → Minecraft game: runs in
README.md - Client loader → Shared loader support: uses
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Client.py - Server loader → Shared loader support: uses
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Server.py - Game environment → MCP client: starts optionally
README.md - Mod developer → MCP client: connects MCP client
README.md - MCP client → MCP tool definitions: registers tools
- MCP tool definitions → Log access: queries logs
- MCP tool definitions → Code execution: executes code
- MCP tool definitions → JSON UI debugger: analyzes UI
- MCP tool definitions → Window capture: captures window
- MCP tool definitions → Window input: controls window
- MCP tool definitions → Profiler service: profiles runtime
- Profiler service → Profiler types: uses types
- MCP client → MCP protocol: uses protocol
- MCP client API → MCP protocol: uses messages
libs/cpp-mcp/include/mcp_client.h - MCP transports → HTTP transport: uses HTTP
- MCP transports → Base64 support: uses encoding
- Window input → Input API: implements API
src/window_input.cpp - Client loader → Loader utilities: uses utilities
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Client.py - Server loader → Loader utilities: uses utilities
mods/INCLUDE_TEST_MOD/DEBUG_ENV_SCRIPT/QuModLibs/Systems/Loader/Server.py