Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e4c8229
add: Dedicated Server implementation
kuwacom Mar 4, 2026
eb75a93
Merge branch 'main' into feature/dedicated-server
kuwacom Mar 4, 2026
6d44e40
add: refactor world loader & add server properties
kuwacom Mar 4, 2026
1d9dccb
update: implement enhanced logging functionality with configurable lo…
kuwacom Mar 4, 2026
7137c44
Merge remote-tracking branch 'origin/main' into feature/dedicated-server
kuwacom Mar 4, 2026
965676f
update: update keyboard and mouse input initialization 1dc8a005ed1114…
kuwacom Mar 5, 2026
7cb4178
fix: change virtual screen resolution to 1920x1080(HD)
kuwacom Mar 5, 2026
0068ed5
Merge remote-tracking branch 'upstream/main' into feature/dedicated-s…
kuwacom Mar 6, 2026
b4eb98e
fix: dedicated server build settings for miniaudio migration and miss…
kuwacom Mar 6, 2026
392dfda
update: changed the virtual screen to 720p
kuwacom Mar 6, 2026
dd779e7
Merge branch 'smartcmd:main' into feature/dedicated-server
kuwacom Mar 6, 2026
06bff53
add: add Docker support for Dedicated Server
kuwacom Mar 6, 2026
e7f12e7
Merge branch 'feature/dedicated-server' of github.com:kuwacom/Minecra…
kuwacom Mar 6, 2026
b8d6289
fix: add initial save for newly created worlds in dedicated server
kuwacom Mar 6, 2026
31bfb7e
update: add basically all configuration options that are implemented …
kuwacom Mar 6, 2026
9e4052e
update: add LAN advertising configuration for server.properties
kuwacom Mar 7, 2026
965a859
add: add implementing interactive command line using linenoise
kuwacom Mar 7, 2026
5f118ca
update: enhance command line completion with predictive hints
kuwacom Mar 7, 2026
fa09e28
add: implement `StringUtils` for string manipulation and refactor usages
kuwacom Mar 7, 2026
4bb1829
fix: send DisconnectPacket on shutdown and fix Win64 recv-thread tear…
kuwacom Mar 7, 2026
dd10c25
fix: return client to menus when Win64 host connection drops
kuwacom Mar 7, 2026
83063f4
Merge origin/main into feature/dedicated-server
kuwacom Mar 7, 2026
35f81c6
update: converted Japanese comments to English
kuwacom Mar 7, 2026
891052e
add: create `Minecraft.Server` developer guide in English and Japanese
kuwacom Mar 7, 2026
71cd0d3
update: add note about issue
kuwacom Mar 7, 2026
49f41b8
add: add `nlohmann/json` json lib
kuwacom Mar 7, 2026
da284c1
add: add FileUtils
kuwacom Mar 8, 2026
b535baa
add: Dedicated Server BAN access manager with persistent player and I…
kuwacom Mar 8, 2026
c91efe0
update: changed file read/write operations to use `FileUtils`.
kuwacom Mar 8, 2026
b250be7
fix: Re-added the source that had somehow disappeared.
kuwacom Mar 8, 2026
71fd1e3
add: significantly improved the dedicated server logging system
kuwacom Mar 8, 2026
dca2a73
Merge origin/main into feature/dedicated-server
kuwacom Mar 8, 2026
842ffe2
fix: added the updated library source
kuwacom Mar 8, 2026
8b68b81
add: add `ban` and `pardon` commands for Player and IP
kuwacom Mar 8, 2026
590241c
fix: fix stop command shutdown process
kuwacom Mar 8, 2026
2979755
fix: fixed the save logic during server shutdown
kuwacom Mar 8, 2026
ed5bf4d
update: added new sever files to Docker entrypoint
kuwacom Mar 8, 2026
aa66924
fix: replace shutdown flag with atomic variable for thread safety
kuwacom Mar 8, 2026
b31e5ce
update: update Dedicated Server developer guide
kuwacom Mar 8, 2026
4ad8247
update: check for the existence of `GameHDD` and create
kuwacom Mar 8, 2026
cfa0a7d
add: add Whitelist to Dedicated Server
kuwacom Mar 11, 2026
7315fcb
refactor: clean up and refactor the code
kuwacom Mar 11, 2026
d9fa241
Merge remote-tracking branch 'upstream/main' into merge/multiplayer
kuwacom Mar 11, 2026
72a324c
fix: include UI header (new update fix)
kuwacom Mar 11, 2026
c819916
fix: fix the detection range for excessive logging
kuwacom Mar 11, 2026
48557c6
update: add world size config to dedicated server properties
kuwacom Mar 11, 2026
96d15b3
update: update README add explanation of `server.properties` & launc…
kuwacom Mar 11, 2026
80d563d
update: add nightly release workflow for dedicated server and client …
kuwacom Mar 11, 2026
8d6d6b1
fix: update name for workflow
kuwacom Mar 11, 2026
64daf89
add random seed generation
sylvessa Mar 11, 2026
d497fd2
add: add Docker nightly workflow for Dedicated Server publish to GitH…
kuwacom Mar 11, 2026
21bdfc4
fix: ghost player when clients disconnect out of order
kuwacom Mar 11, 2026
2d71095
Merge pull request #6 from sylvessa/fix/dedi-random-seed
kuwacom Mar 12, 2026
e21bd16
fix: fix 7zip option
kuwacom Mar 12, 2026
6f0e531
fix: fix Docker workflow for Dedicated Server artifact handling
kuwacom Mar 12, 2026
e4dfb0a
add: add no build Dedicated Server startup scripts and Docker Compose
kuwacom Mar 12, 2026
f53c049
update: add README for Docker Dedicated Server setup with no local build
kuwacom Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions .github/workflows/docker-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
name: Docker Nightly Dedicated Server

on:
workflow_dispatch:
push:
branches:
- "main"
- 'feature/dedicated-server'
paths-ignore:
- ".gitignore"
- "*.md"
- ".github/*.md"

permissions:
contents: read
packages: write

concurrency:
group: docker-nightly-dedicated-server
cancel-in-progress: true

jobs:
build-runtime:
name: Build Dedicated Server Runtime
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup msbuild
uses: microsoft/setup-msbuild@v2

- name: Build Dedicated Server Runtime Only
shell: pwsh
run: |
MSBuild.exe Minecraft.World\Minecraft.World.vcxproj /p:Configuration=Release /p:Platform=x64 /m
MSBuild.exe Minecraft.Server\Minecraft.Server.vcxproj /p:Configuration=Release /p:Platform=x64 /m
- name: Stage dedicated server runtime
shell: pwsh
run: |
$serverOut = "Minecraft.Server/x64/Minecraft.Server/Release"
$stage = ".artifacts/dedicated-server-runtime"
if (Test-Path $stage) {
Remove-Item -Path $stage -Recurse -Force
}
New-Item -ItemType Directory -Path (Join-Path $stage "Windows64") -Force | Out-Null
# Minimum required runtime files
$required = @(
"Minecraft.Server.exe",
"iggy_w64.dll",
"Common"
)
foreach ($entry in $required) {
$src = Join-Path $serverOut $entry
if (-not (Test-Path $src)) {
throw "Missing required runtime path: $src"
}
}
# Copy required files
Copy-Item -Path (Join-Path $serverOut "Minecraft.Server.exe") -Destination (Join-Path $stage "Minecraft.Server.exe") -Force
Copy-Item -Path (Join-Path $serverOut "iggy_w64.dll") -Destination (Join-Path $stage "iggy_w64.dll") -Force
Copy-Item -Path (Join-Path $serverOut "Common") -Destination (Join-Path $stage "Common") -Recurse -Force
if (Test-Path (Join-Path $serverOut "Windows64")) {
Copy-Item -Path (Join-Path $serverOut "Windows64/*") -Destination (Join-Path $stage "Windows64") -Recurse -Force
} else {
Write-Host "Windows64 directory is not present in build output; staging without it."
}
Get-ChildItem -Path $stage -Recurse -File | Select-Object -First 20 | ForEach-Object {
Write-Host "Staged: $($_.FullName)"
}
- name: Upload dedicated server runtime to artifacts
uses: actions/upload-artifact@v4
with:
name: dedicated-server-runtime
if-no-files-found: error
path: |
.artifacts/dedicated-server-runtime/**
docker-publish:
name: Build and Push Docker Image
runs-on: ubuntu-latest
needs: build-runtime

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Download dedicated server runtime from artifacts
uses: actions/download-artifact@v4
with:
name: dedicated-server-runtime
path: .artifacts/runtime

- name: Prepare Docker runtime directory
shell: bash
run: |
set -euo pipefail
rm -rf runtime
mkdir -p runtime
cp .artifacts/runtime/Minecraft.Server.exe runtime/Minecraft.Server.exe
cp .artifacts/runtime/iggy_w64.dll runtime/iggy_w64.dll
cp -R .artifacts/runtime/Common runtime/Common
mkdir -p runtime/Windows64
if [[ -d ".artifacts/runtime/Windows64" ]]; then
cp -R .artifacts/runtime/Windows64/. runtime/Windows64/
fi
test -f runtime/Minecraft.Server.exe
test -f runtime/iggy_w64.dll
test -d runtime/Common
test -d runtime/Windows64
- name: Compute image name
id: image
shell: bash
run: |
owner="$(echo "${{ vars.CONTAINER_REGISTRY_OWNER || github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
image_tag="nightly"
# if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
# image_tag="nightly-test"
# fi
echo "owner=$owner" >> "$GITHUB_OUTPUT"
echo "image=ghcr.io/$owner/minecraft-lce-dedicated-server" >> "$GITHUB_OUTPUT"
echo "image_tag=$image_tag" >> "$GITHUB_OUTPUT"
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.image.outputs.image }}
tags: |
type=raw,value=${{ steps.image.outputs.image_tag }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME || github.actor }}
password: ${{ secrets.GHCR_TOKEN || secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: docker/dedicated-server/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MC_RUNTIME_DIR=runtime
29 changes: 26 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Nightly Release
name: Nightly Releases

on:
workflow_dispatch:
push:
branches:
- 'main'
- 'feature/dedicated-server'
paths-ignore:
- '.gitignore'
- '*.md'
- '.github/*.md'

permissions:
contents: write

jobs:
build:
name: Build Windows64
Expand All @@ -28,13 +32,16 @@ jobs:
- name: Zip Build
run: 7z a -r LCEWindows64.zip ./x64/Release/*

- name: Update release
- name: Zip Dedicated Server Build
run: 7z a -r LCEServerWindows64.zip ./x64/Minecraft.Server/Release/*

- name: Update Client release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: Nightly Release
name: Nightly Client Release
body: |
Requires at least Windows 7 and DirectX 11 compatible GPU to run. Compiled with MSVC v14.44.35207 in Release mode with Whole Program Optimization, as well as `/O2 /Ot /Oi /Ob3 /GF /fp:precise`.
Expand All @@ -44,3 +51,19 @@ jobs:
LCEWindows64.zip
./x64/Release/Minecraft.Client.exe
./x64/Release/Minecraft.Client.pdb
- name: Update Dedicated Server release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly-dedicated-server
name: Nightly Dedicated Server Release
body: |
Dedicated Server runtime for Windows64.
Download `LCEServerWindows64.zip` and extract it to a folder where you'd like to keep the server runtime.
files: |
LCEServerWindows64.zip
./x64/Minecraft.Server/Release/Minecraft.Server.exe
./x64/Minecraft.Server/Release/Minecraft.Server.pdb
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,12 @@ Minecraft.World/x64_Debug/
Minecraft.World/Release/
Minecraft.World/x64_Release/

Minecraft.Server/x64/
Minecraft.Server/Debug/
Minecraft.Server/x64_Debug/
Minecraft.Server/Release/
Minecraft.Server/x64_Release/

build/*

# Existing build output files
Expand All @@ -434,6 +440,9 @@ build/*
# Local saves
Minecraft.Client/Saves/

tmp*/
_server_asset_probe/
server-data/
# Visual Studio Per-User Config
*.user
/out
89 changes: 88 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,84 @@ target_link_libraries(MinecraftClient PRIVATE
>
)

set(MINECRAFT_SERVER_SOURCES ${MINECRAFT_CLIENT_SOURCES})
list(APPEND MINECRAFT_SERVER_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Windows64/ServerMain.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Access/Access.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Access/BanManager.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Access/WhitelistManager.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/ServerCli.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/ServerCliInput.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/ServerCliParser.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/ServerCliEngine.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/ServerCliRegistry.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandBan.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandBanIp.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandBanList.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandHelp.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandPardon.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandPardonIp.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandStop.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandList.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandTp.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandWhitelist.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Console/commands/CliCommandGamemode.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Common/FileUtils.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Common/StringUtils.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/ServerLogger.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/ServerLogManager.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/ServerProperties.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/vendor/linenoise/linenoise.c"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/WorldManager.cpp"
)

add_executable(MinecraftServer ${MINECRAFT_SERVER_SOURCES})
target_include_directories(MinecraftServer PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Iggy/include"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Xbox/Sentient/Include"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.World/x64headers"
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Server/Windows64"
)
target_compile_definitions(MinecraftServer PRIVATE
$<$<CONFIG:Debug>:_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_DEBUG;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;MINECRAFT_SERVER_BUILD>
$<$<NOT:$<CONFIG:Debug>>:_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;MINECRAFT_SERVER_BUILD>
)
if(MSVC)
configure_msvc_target(MinecraftServer)
target_link_options(MinecraftServer PRIVATE
$<$<CONFIG:Release>:/LTCG /INCREMENTAL:NO>
)
endif()

set_target_properties(MinecraftServer PROPERTIES
OUTPUT_NAME "Minecraft.Server"
VS_DEBUGGER_WORKING_DIRECTORY "$<TARGET_FILE_DIR:MinecraftServer>"
VS_DEBUGGER_COMMAND_ARGUMENTS "-port 25565 -bind 0.0.0.0 -name DedicatedServer"
)

target_link_libraries(MinecraftServer PRIVATE
MinecraftWorld
d3d11
XInput9_1_0
wsock32
legacy_stdio_definitions
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Iggy/lib/iggy_w64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Iggy/lib/iggyperfmon_w64.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/Iggy/lib/iggyexpruntime_w64.lib"
$<$<CONFIG:Debug>:
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Input_d.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage_d.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC_d.lib"
>
$<$<NOT:$<CONFIG:Debug>>:
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Input.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage.lib"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC.lib"
>
)

if(CMAKE_HOST_WIN32)
message(STATUS "Starting redist copy...")
execute_process(
Expand Down Expand Up @@ -147,4 +225,13 @@ else()
message(FATAL_ERROR "Redist and asset copying is only supported on Windows (Robocopy) and Unix systems (rsync).")
endif()

set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT MinecraftClient)
add_custom_command(TARGET MinecraftServer POST_BUILD
COMMAND "${CMAKE_COMMAND}"
-DPROJECT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
-DOUTPUT_DIR="$<TARGET_FILE_DIR:MinecraftServer>"
-DCONFIGURATION=$<CONFIG>
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyServerAssets.cmake"
VERBATIM
)

set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT MinecraftServer)
Loading
Loading