Build System & CI
MinecraftConsoles supports two build methods: the original Visual Studio solution (.sln) and a newer CMake-based build. Both target Windows x64 only at build time.
The CMake build enforces C++17:
set(CMAKE_CXX_STANDARD 17)set(CMAKE_CXX_STANDARD_REQUIRED ON)set(CMAKE_CXX_EXTENSIONS OFF)The project uses C++17 features throughout, including shared_ptr, make_shared, dynamic_pointer_cast, and modern STL containers.
Build methods
Section titled “Build methods”Visual Studio solution
Section titled “Visual Studio solution”File: MinecraftConsoles.sln
This is the main build method, documented in COMPILE.md:
- Open
MinecraftConsoles.slnin Visual Studio 2022. - Set
Minecraft.Clientas the Startup Project. - Pick your configuration:
Debug(recommended) orRelease. - Pick your platform:
Windows64. - Build with
Ctrl+Shift+B, run withF5.
File: CMakeLists.txt
A supplementary build system that generates a Visual Studio 2022 solution.
Configure:
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 \ -DCMAKE_GENERATOR_INSTANCE="C:/Program Files/Microsoft Visual Studio/2022/Community"Build:
cmake --build build --config Debug --target MinecraftClientcmake --build build --config Release --target MinecraftClientRun:
cd .\build\Debug.\MinecraftClient.exeThe game relies on relative paths (e.g., Common\Media\...), so you need to launch it from the output directory.
Project structure
Section titled “Project structure”The CMake build defines two targets:
| Target | Type | Description |
|---|---|---|
MinecraftWorld | Static library | Game logic, entities, items, tiles, commands |
MinecraftClient | Win32 executable | Rendering, UI, networking, platform code |
Source file lists are kept in separate CMake includes:
cmake/WorldSources.cmakefor allMinecraft.World/source filescmake/ClientSources.cmakefor allMinecraft.Client/source files
Compile definitions
Section titled “Compile definitions”Both targets define:
| Definition | Purpose |
|---|---|
_LARGE_WORLDS | Extended world size support |
_DEBUG_MENUS_ENABLED | Debug menu availability |
_CRT_NON_CONFORMING_SWPRINTFS | MSVC printf compatibility |
_CRT_SECURE_NO_WARNINGS | Disable MSVC security warnings |
_WINDOWS64 | 64-bit platform flag |
_DEBUG | Debug-only definition |
_LIB | World library only |
MSVC options
Section titled “MSVC options”The configure_msvc_target() function applies:
Debug:
/W3warnings/MPmulti-processor compilation/FSforce synchronous PDB writes/EHscC++ exception handling
Release:
/W0warnings (all disabled)/MPmulti-processor compilation/GLwhole-program optimization/O2maximize speed/Oiintrinsic functions/GTfiber-safe thread-local storage/GFstring pooling
Release linker:
/LTCGlink-time code generation/INCREMENTAL:NOno incremental linking
Dependencies
Section titled “Dependencies”MinecraftClient links against:
| Library | Purpose |
|---|---|
MinecraftWorld | Static library with game logic |
d3d11 | DirectX 11 rendering |
XInput9_1_0 | Controller input |
wsock32 | Networking |
legacy_stdio_definitions | MSVC compatibility |
iggy_w64.lib | SWF/Flash UI rendering |
iggyperfmon_w64.lib | Iggy performance monitoring |
iggyexpruntime_w64.lib | Iggy expression runtime |
4J_Input.lib | 4J input abstraction (debug/release variants) |
4J_Storage.lib | 4J storage abstraction (debug/release variants) |
4J_Render_PC.lib | 4J rendering abstraction (debug/release variants) |
The Iggy libraries handle the Flash/SWF-based UI system from the original console edition. The 4J libraries are proprietary platform abstraction layers.
Platform support
Section titled “Platform support”Windows (primary)
Section titled “Windows (primary)”Both the .sln and CMake builds target Windows x64 only. The CMake build checks for this explicitly:
if(NOT WIN32) message(FATAL_ERROR "This CMake build currently supports Windows only.")endif()if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message(FATAL_ERROR "Use a 64-bit generator/toolchain (x64).")endif()Asset copying
Section titled “Asset copying”The CMake build automatically copies runtime assets during configuration:
Windows: Uses robocopy.exe to copy:
- Redistributables from
x64/Release/ - Client assets (excluding source files)
- DurangoMedia patches
Unix/Linux: Uses rsync with equivalent exclusion filters. This path exists for asset copying, but the actual compilation still needs MSVC.
The asset copy excludes source files (*.cpp, *.h, etc.), build files, scripts, and platform-specific directories (Durango*, Orbis*, PS*, Xbox).
Running on Linux
Section titled “Running on Linux”Per COMPILE.md, contributors on Linux need a Windows machine or VM to build. Running the compiled game via Wine is a separate concern from having a supported build environment.
The CONTRIBUTING.md notes that one of the project’s goals is “having workable multi-platform compilation for ARM, Consoles, Linux.” This is a future goal, not something that works today.
Platform-specific code
Section titled “Platform-specific code”The source contains several platform ifdefs:
| Macro | Platform |
|---|---|
__ORBIS__ | PlayStation (Orbis) |
_WINDOWS64 | Windows 64-bit |
_DURANGO | Xbox One |
These are remnants of the original multi-platform console codebase. For example, BaseAttributeMap uses a different hash function on Orbis because the PlayStation standard library doesn’t default-hash enums.
MinecraftConsoles uses three GitHub Actions workflows:
debug-test.yml (PR gate)
Section titled “debug-test.yml (PR gate)”Triggers: Pull requests (opened, reopened, synchronize), pushes to main, and manual dispatch.
Runs a Debug build on windows-latest using MSBuild. This is the main CI gate that makes sure all PRs compile successfully. It ignores changes to .gitignore and markdown files (both root and .github/ markdown).
nightly.yml (nightly release)
Section titled “nightly.yml (nightly release)”Triggers: Pushes to main and manual dispatch.
Builds a Release configuration on windows-latest, zips the output as LCEWindows64.zip, and publishes it as a nightly release using the andelf/nightly-release action. The release includes:
LCEWindows64.zip, the full game packageMinecraft.Client.exe, the standalone executableMinecraft.Client.pdb, debug symbols
Release builds use MSVC v14.44.35207 with /O2 /Ot /Oi /Ob3 /GF /fp:precise.
build.yml (manual)
Section titled “build.yml (manual)”Triggers: Manual dispatch only (workflow_dispatch).
Builds both Release and Debug configurations in a matrix strategy. Uploads artifacts for each configuration as MinecraftClient-Release and MinecraftClient-Debug.
Code quality tools
Section titled “Code quality tools”.clang-format
Section titled “.clang-format”File: .clang-format
The project includes a clang-format configuration based on the Microsoft style:
| Setting | Value |
|---|---|
| Base style | Microsoft |
| Indent width | 4 |
| Tab width | 4 |
| Use tabs | Never |
| Column limit | 0 (unlimited) |
| Pointer alignment | Right (int *ptr) |
| Brace wrapping | Always after control statements |
| Insert braces | Yes (enforces braces on single-line blocks) |
| Sort includes | Case sensitive |
| Standard | Latest |
Notable settings: InsertBraces: true makes sure all control flow blocks have braces, and ColumnLimit: 0 turns off line length enforcement.
Differences from LCEMP build
Section titled “Differences from LCEMP build”| Aspect | LCEMP | MinecraftConsoles |
|---|---|---|
| Build system | Visual Studio .sln | .sln + CMake |
| CI/CD | None documented | 3 GitHub Actions workflows |
| Code formatting | No enforced standard | .clang-format (Microsoft-based) |
| Nightly releases | None | Automated via GitHub Actions |
| PR validation | None | Debug build on every PR |
| Asset copying | Manual | Automated in CMake (robocopy/rsync) |
| C++ standard | C++11 | C++17 |
| Source file count | ~1,564 (World) | ~1,837 (World) + ~606 (Client) |
LCEMP also has a build-macos directory and a Common top-level directory that don’t exist in MinecraftConsoles. LCEMP includes ConsoleSaveFileSplit files not present in MinecraftConsoles.
Contributing
Section titled “Contributing”The CONTRIBUTING.md file outlines strict contribution guidelines:
- Scope: Stability, quality of life, and platform support over new content. No Java Edition backports, visual changes, or content without LCE precedent.
- Parity: Must match original LCE visual and gameplay experience.
- Accepted changes: Bug fixes, multi-platform support, SWF-free UI replacements, asset quality improvements, dedicated server menus, Steamworks networking, keyboard/mouse support.
- PR requirements: One topic per PR, fully documented changes, use the PR template. Undocumented changes cause closure.
- AI policy: Code written largely or noticeably by an LLM is not accepted.