Skip to content

These docs were made completely by AI, so they might be right, or wrong, you'll need to test them yourself. This was made for a easier understanding of everything. So use at your own risk. If anything is wrong, please don't hurt to make a PR on the page you have a problem with. ON GITHUB

Building & Compiling

  • CMake 3.10 or higher
  • MSVC (Visual Studio 2022 recommended), since the project uses MSVC-specific compiler flags (/W3, /MP, /MT, /EHsc)
  • Windows, which is the only supported build target (the CMakeLists.txt explicitly checks if(NOT WIN32) and errors out)

You need to provide these directories yourself. They are not included in the repository.

These are the core content files the game needs to run:

DirectoryWhat’s in it
Minecraft.Client/music/Background music files (played through Miles Sound System)
Minecraft.Client/Common/Media/Media archive containing bundled game data
Minecraft.Client/Common/res/Resources: textures, fonts, GUI assets, mob textures
Minecraft.Client/Common/DummyTexturePack/Fallback texture pack used when no other pack is loaded

Each platform has its own media directory with platform-specific assets:

  • Minecraft.Client/DurangoMedia/ (Xbox One)
  • Minecraft.Client/OrbisMedia/ (PS4)
  • Minecraft.Client/PS3Media/ (PS3)
  • Minecraft.Client/PSVitaMedia/ (PS Vita)
  • Minecraft.Client/Windows64Media/ (Windows 64-bit, this is the one you need for PC builds)

These DLLs need to be in the working directory at runtime:

FileWhat it is
x64/Debug/iggy_w64.dllIggy SWF/Flash UI runtime
x64/Debug/mss64.dllMiles Sound System runtime
  • Minecraft.Client/redist64/ contains redistributable runtime files

Each platform has its own set of 4J Studios pre-compiled libraries:

DirectoryContains
Minecraft.Client/Windows64/4JLibs/4J_Input, 4J_Storage, 4J_Profile, 4J_Render_PC (release _r and debug _d variants)
Minecraft.Client/Xbox/4JLibs/Xbox 360 4J libraries
Minecraft.Client/Durango/4JLibs/Xbox One 4J libraries
Minecraft.Client/PS3/4JLibs/PS3 4J libraries
Minecraft.Client/Orbis/4JLibs/PS4 4J libraries
Minecraft.Client/PSVita/4JLibs/PS Vita 4J libraries

Only the Windows64 libraries are needed for PC builds.

Each platform needs its own middleware binaries:

MiddlewareDirectories
Miles Sound SystemMiles/ inside each platform directory
Iggy UIIggy/ inside each platform directory (includes headers in include/ and libs in lib/)
Sentient TelemetrySentient/ inside each platform directory (includes headers in Include/)

Only needed if you’re targeting PlayStation (not required for PC builds):

  • Minecraft.Client/PS3_GAME/ (PS3 game data)
  • Minecraft.Client/PS4_GAME/ (PS4 game data)
  • Minecraft.Client/sce_sys/ (Sony system files)
  • Minecraft.Client/TROPDIR/ (Trophy data)
  • Minecraft.Client/PS3/PS3Extras/DirectX/ (DirectX compatibility headers for PS3)
  • Minecraft.Client/PS3/PS3Extras/HeapInspector/ (Memory debugging tools)
  • Minecraft.Client/PS3/PS3Extras/boost_1_53_0/ (Boost library for PS3)
  • Minecraft.Client/Common/Network/Sony/ (Sony network platform manager)
  • Minecraft.Client/common/dlc/ (DLC content files, lowercase “common”)
  • Minecraft.Client/durango/sound/ (Xbox One sound files, lowercase)
  • Minecraft.Client/xbox/MinecraftWindows.rc (Windows resource file)
  • Minecraft.Client/xbox/MinecraftWindows.ico (Application icon)
  • Minecraft.Client/xbox/small.ico (Small application icon)

Collect all the assets listed above. At minimum for a Windows build you need:

  • The Common/res/, Common/Media/, and Common/DummyTexturePack/ directories
  • The Windows64Media/ directory
  • The Windows64/4JLibs/, Windows64/Iggy/, Windows64/Miles/, and Windows64/Sentient/ directories
  • The runtime DLLs (iggy_w64.dll, mss64.dll)
  • The resource file and icons from xbox/

Place the LCEMP Minecraft.Client and Minecraft.World source folders alongside the CMakeLists.txt. Your directory structure should look like:

LCEMP/
├── CMakeLists.txt
├── cmake/
│ └── Sources.cmake
├── Minecraft.World/
│ ├── *.h / *.cpp
│ └── x64headers/
├── Minecraft.Client/
│ ├── *.h / *.cpp
│ ├── Common/
│ ├── Windows64/
│ └── ...
└── Assets/ # Working directory (set via LCEMP_WORKING_DIR)
Terminal window
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64

This generates a Visual Studio 2022 solution targeting x64. You can also use other generators:

Terminal window
# Visual Studio 2019
cmake .. -G "Visual Studio 16 2019" -A x64
# Ninja (for faster builds)
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
Terminal window
# Release build
cmake --build . --config Release
# Debug build (enables debug menus and debug overlay)
cmake --build . --config Debug

Or open the generated .sln file in Visual Studio and build from there.

The game needs a working directory to find its assets. CMake sets this via the LCEMP_WORKING_DIR variable:

Terminal window
cmake .. -G "Visual Studio 17 2022" -A x64 -DLCEMP_WORKING_DIR="C:/path/to/your/assets"

If not set, it defaults to an Assets/ folder next to the CMakeLists.txt. In Visual Studio, this is configured as the debugger working directory via VS_DEBUGGER_WORKING_DIRECTORY.

Make sure iggy_w64.dll and mss64.dll are in the output directory (next to the built exe) or in the working directory.

Terminal window
Minecraft.Client.exe

Or run with launch arguments (see below).

Type: STATIC library (.lib)
Compile definitions (Release):
_LARGE_WORLDS
_LIB
_CRT_NON_CONFORMING_SWPRINTFS
_CRT_SECURE_NO_WARNINGS
_WINDOWS64
Compile definitions (Debug, adds):
_DEBUG_MENUS_ENABLED
_DEBUG
Include directories:
Minecraft.World/
Minecraft.World/x64headers/
Type: WIN32 executable (.exe)
Compile definitions (Release):
_LARGE_WORLDS
_CRT_NON_CONFORMING_SWPRINTFS
_CRT_SECURE_NO_WARNINGS
_WINDOWS64
Compile definitions (Debug, adds):
_DEBUG_MENUS_ENABLED
_DEBUG
Include directories:
Minecraft.Client/
Minecraft.Client/Windows64/Iggy/include/
Minecraft.Client/Xbox/Sentient/Include/
Link libraries:
MinecraftWorld.lib (the static library built above)
d3d11.lib
XInput9_1_0.lib
Windows64/Iggy/lib/iggy_w64.lib
Windows64/Miles/lib/mss64.lib
Windows64/4JLibs/libs/4J_Input_r.lib (or _d for Debug)
Windows64/4JLibs/libs/4J_Storage_r.lib (or _d for Debug)
Windows64/4JLibs/libs/4J_Profile_r.lib (or _d for Debug)
Windows64/4JLibs/libs/4J_Render_PC.lib (or _PC_d for Debug)
FlagPurpose
/W3Warning level 3 (moderate warnings)
/MPMulti-process compilation (compiles multiple .cpp files in parallel)
/MTMulti-threaded static CRT for Release (matches 4J libs)
/MTdMulti-threaded static debug CRT for Debug
/EHscC++ exception handling (synchronous exceptions only)

The CRT linkage (/MT vs /MTd) is critical. The 4J libraries were compiled with the static multi-threaded CRT, so the game must match. Using /MD (dynamic CRT) will cause linker errors.

Source files are listed in cmake/Sources.cmake in two variables:

  • MINECRAFT_WORLD_SOURCES (706 .cpp files)
  • MINECRAFT_CLIENT_SOURCES (454 .cpp files, including Common/ subdirectory sources and Windows64/ platform sources)

CMake prepends the module directory path to each filename, so the source lists use relative paths like "Tile.cpp" and "Common/UI/UIScene.cpp".

ArgumentUsageDescription
-name-name <username>Sets your in-game username. Shows up in multiplayer for other players
-ip-ip <targetip>Manually connect to a server IP if LAN discovery doesn’t find it
-port-port <targetport>Override the default port (25565) if the host changed it in source

Example:

Minecraft.Client.exe -name Steve -ip 192.168.0.25 -port 25565

If you don’t pass -name, the game uses a default username. If you don’t pass -ip, the game uses LAN discovery (UDP broadcast on port 25566) to find local servers.

These are defined in WinsockNetLayer.h and can be changed if needed:

ConstantDefaultPurpose
WIN64_NET_DEFAULT_PORT25565TCP port for game connections
WIN64_NET_MAX_CLIENTS7Max remote clients (host + 7 = 8 players)
WIN64_NET_RECV_BUFFER_SIZE65536TCP receive buffer size per connection
WIN64_NET_MAX_PACKET_SIZE3 MBMax single packet size
WIN64_LAN_DISCOVERY_PORT25566UDP port for LAN broadcast/discovery
WIN64_LAN_BROADCAST_MAGIC0x4D434C4EMagic bytes in broadcast packet (“MCLN”)
WIN64_LAN_BROADCAST_PLAYERS8Max player slots advertised
DefineWherePurpose
_LARGE_WORLDSBoth targetsEnables large world support. Changes the lighting cache type from unsigned int to __uint64, increases coordinate range
_WINDOWS64Both targetsSelects Windows 64-bit platform layer. Guards platform-specific code blocks
_LIBWorld onlyIndicates static library compilation
_DEBUG_MENUS_ENABLEDDebug onlyEnables debug options menu, debug overlay, debug console, schematic tools
_DEBUGDebug onlyGeneral debug flag, enables assertions and extra validation
_CRT_NON_CONFORMING_SWPRINTFSBoth targetsAllows old-style swprintf without buffer size parameter
_CRT_SECURE_NO_WARNINGSBoth targetsSuppresses MSVC “unsafe function” warnings for strcpy, sprintf, etc.

Other platform defines you’ll see in the codebase (not used in the CMake PC build):

DefinePlatform
_XBOXXbox 360
_DURANGOXbox One
__PS3__PlayStation 3
__ORBIS__PlayStation 4
__PSVITA__PlayStation Vita

Linker errors about unresolved symbols in 4J libs

Section titled “Linker errors about unresolved symbols in 4J libs”

Make sure you’re using the matching CRT configuration. The 4J libraries use static multi-threaded CRT (/MT). If your project uses /MD, you’ll get mismatched CRT linker errors. The CMakeLists.txt handles this with CMAKE_MSVC_RUNTIME_LIBRARY.

Missing iggy_w64.dll or mss64.dll at runtime

Section titled “Missing iggy_w64.dll or mss64.dll at runtime”

Copy these DLLs to the same directory as your built .exe, or to the working directory. The game will crash on startup if it can’t find them.

Check that the working directory (LCEMP_WORKING_DIR) points to where your game assets are. The game expects to find texture packs, media archives, and fonts in that directory.

The project has ~1,160 .cpp files across both targets. Use the /MP flag (already set in CMake) for parallel compilation. With Ninja generator instead of MSBuild, builds can be faster too.

Make sure the host is running on port 25565 (TCP) and the LAN discovery port 25566 (UDP) is not blocked by your firewall. Both players need to be on the same LAN for discovery to work, or use the -ip flag to connect directly.