From 277d74716e9a2c937500e16273727a24f49508ee Mon Sep 17 00:00:00 2001 From: Botch Date: Sat, 28 Mar 2026 13:44:27 -0600 Subject: [PATCH 1/7] Render custom skin boxes on viewmodel (#1415) * Update PlayerRenderer.cpp * Fix fatal bug where skins with no additional boxes would crash the game --- Minecraft.Client/PlayerRenderer.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index a9b94544..23dff77f 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -519,6 +519,29 @@ void PlayerRenderer::renderHand() { humanoidModel->arm0->render(1 / 16.0f,true); } + + + //Render custom skin boxes on viewmodel - Botch + vector* additionalModelParts = Minecraft::GetInstance()->player->GetAdditionalModelParts(); + if (!additionalModelParts) return; //If there are no custom boxes, return. This fixes bug where the game will crash if you select a skin with no additional boxes. + vector armchildren = humanoidModel->arm0->children; + std::unordered_set additionalModelPartSet(additionalModelParts->begin(), additionalModelParts->end()); + for (const auto& x : armchildren) { + if (x) { + if (additionalModelPartSet.find(x) != additionalModelPartSet.end()) { //This is to verify box is still actually on current skin - Botch + glPushMatrix(); + //We need to transform to match offset of arm - Botch + glTranslatef(-5 * 0.0625f, 2 * 0.0625f, 0); + glRotatef(0.1 * (180.0f / PI), 0, 0, 1); + x->visible = true; + x->render(1.0f / 16.0f, true); + x->visible = false; + glPopMatrix(); + } + } + } + + } void PlayerRenderer::setupPosition(shared_ptr _mob, double x, double y, double z) @@ -580,4 +603,4 @@ ResourceLocation *PlayerRenderer::getTextureLocation(shared_ptr entity) { shared_ptr player = dynamic_pointer_cast(entity); return new ResourceLocation(static_cast<_TEXTURE_NAME>(player->getTexture())); -} \ No newline at end of file +} From 38d58f2d8bb8af5516671b42940279d4e582d9c7 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 29 Mar 2026 05:35:25 +0100 Subject: [PATCH 2/7] Update actions workflows and add clang format check for PRs (#1418) * Add clang-format workflow for pull request checks * Modify push paths in nightly workflow Updated paths for push event to include all files except specified ones. * Update paths for nightly-server workflow triggers * Modify paths for pull request triggers Update pull request workflow to include specific paths. * Tidy up clang-format installation in workflow --- .github/workflows/clang-format.yml | 48 ++++++++++++++++++++++++++++ .github/workflows/nightly-server.yml | 11 ++++--- .github/workflows/nightly.yml | 11 ++++--- .github/workflows/pull-request.yml | 10 +++--- 4 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/clang-format.yml diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 00000000..a01bada4 --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -0,0 +1,48 @@ +name: Check formatting + +on: + pull_request: + paths: + - '**' + - '!.gitignore' + - '!*.md' + - '!.github/**' + - '.github/workflows/clang-format.yml' + +permissions: + contents: read + pull-requests: write + +jobs: + format-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Fetch base commit + run: git fetch origin ${{ github.event.pull_request.base.sha }} + + - name: Install clang-format-20 + run: | + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" + sudo apt-get install -y -qq clang-format-20 + + - uses: reviewdog/action-setup@v1 + + - name: Check formatting on changed lines + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git clang-format-20 --binary clang-format-20 \ + --diff ${{ github.event.pull_request.base.sha }} -- \ + '*.c' '*.cpp' '*.cc' '*.h' '*.hpp' \ + | reviewdog \ + -name="clang-format" \ + -f=diff \ + -reporter=github-pr-check \ + -fail-level=error \ + -filter-mode=added diff --git a/.github/workflows/nightly-server.yml b/.github/workflows/nightly-server.yml index 5450de9a..0fc20eb1 100644 --- a/.github/workflows/nightly-server.yml +++ b/.github/workflows/nightly-server.yml @@ -5,11 +5,12 @@ on: push: branches: - 'main' - paths-ignore: - - '.gitignore' - - '*.md' - - '.github/**' - - '!.github/workflows/nightly-server.yml' + paths: + - '**' + - '!.gitignore' + - '!*.md' + - '!.github/**' + - '.github/workflows/nightly-server.yml' permissions: contents: write diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 789db3e8..a5b53be0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,11 +5,12 @@ on: push: branches: - 'main' - paths-ignore: - - '.gitignore' - - '*.md' - - '.github/**' - - '!.github/workflows/nightly.yml' + paths: + - '**' + - '!.gitignore' + - '!*.md' + - '!.github/**' + - '.github/workflows/nightly.yml' permissions: contents: write diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9d57f4b4..3b5398a0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,10 +4,12 @@ on: workflow_dispatch: pull_request: types: [opened, reopened, synchronize] - paths-ignore: - - '.gitignore' - - '*.md' - - '.github/*.md' + paths: + - '**' + - '!.gitignore' + - '!*.md' + - '!.github/**' + - '.github/workflows/pull-request.yml' jobs: build: From d3412aaae731c219e5b41574ea1ba924b003b3a8 Mon Sep 17 00:00:00 2001 From: blongm <33197955+blongm@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:05:32 +0000 Subject: [PATCH 3/7] Fixed issue with world seeds not saving correctly (#1119) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fix issue where typing in a short seed on world creation doesn't save the seed correctly ## Changes ### Previous Behavior Typing in a seed on the world creation menu that's less than 8 characters long will result in garbage data being saved as the seed. Happens with controller and KBM. You can see this in-game - if you exit the world options menu and go back in, the seed will show up as boxes □□□. Weirdly, if you type a seed again, it behaves as expected. ### Root Cause For some reason, assigning `m_params->seed` to the seed text points it to garbage data, when it's 7 characters or less. ### New Behavior Seed entry behaves as expected. ### Fix Implementation - Added `static_cast` before assignment to `m_params->seed`. - Also replaced `(wchar_t *)` with `reinterpret_cast` in the functions. ### AI Use Disclosure No AI was used --- .../Common/UI/UIScene_LaunchMoreOptionsMenu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index b2981ebf..1832e40c 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -557,8 +557,8 @@ int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(LPVOID lpParam,b uint16_t pchText[128]; ZeroMemory(pchText, 128 * sizeof(uint16_t)); Win64_GetKeyboardText(pchText, 128); - pClass->m_editSeed.setLabel((wchar_t *)pchText); - pClass->m_params->seed = (wchar_t *)pchText; + pClass->m_editSeed.setLabel(reinterpret_cast(pchText)); + pClass->m_params->seed = static_cast(reinterpret_cast(pchText)); #else #ifdef __PSVITA__ uint16_t pchText[2048]; @@ -584,7 +584,7 @@ void UIScene_LaunchMoreOptionsMenu::getDirectEditInputs(vectorseed = input->getEditBuffer(); + m_params->seed = static_cast(input->getEditBuffer()); } #endif From c2356bf29ea3d84c658958b29f03c8f46c4812bd Mon Sep 17 00:00:00 2001 From: Sneexy <60184397+SnenxyTengoku@users.noreply.github.com> Date: Wed, 1 Apr 2026 19:10:47 -0500 Subject: [PATCH 4/7] Minor docker/container fixes and edits (#1454) --- docker-compose.dedicated-server.ghcr.yml | 7 +++++-- docker-compose.dedicated-server.yml | 7 +++++-- docker/dedicated-server/entrypoint.sh | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docker-compose.dedicated-server.ghcr.yml b/docker-compose.dedicated-server.ghcr.yml index 8bcaf484..7a9a95b2 100644 --- a/docker-compose.dedicated-server.ghcr.yml +++ b/docker-compose.dedicated-server.ghcr.yml @@ -1,12 +1,12 @@ services: minecraft-lce-dedicated-server: - image: ghcr.io/kuwacom/minecraft-lce-dedicated-server:nightly + image: ghcr.io/smartcmd/minecraft-lce-dedicated-server:nightly container_name: minecraft-lce-dedicated-server restart: unless-stopped tty: true stdin_open: true environment: - TZ: ${TZ:-Asia/Tokyo} + TZ: ${TZ:-Etc/UTC} WINEARCH: win64 WINEPREFIX: /var/opt/wineprefix64 WINEDEBUG: -all @@ -15,6 +15,9 @@ services: # minimum required virtual screen XVFB_DISPLAY: ${XVFB_DISPLAY:-:99} XVFB_SCREEN: ${XVFB_SCREEN:-720x1280x16} + # ip & port the server will run on + SERVER_BIND_IP: ${SERVER_BIND_IP:-0.0.0.0} + SERVER_PORT: ${SERVER_PORT:-25565} volumes: # - wineprefix64:/var/opt/wineprefix64 - ./server-data:/srv/persist diff --git a/docker-compose.dedicated-server.yml b/docker-compose.dedicated-server.yml index 4a0d3313..3dbe8bf6 100644 --- a/docker-compose.dedicated-server.yml +++ b/docker-compose.dedicated-server.yml @@ -10,7 +10,7 @@ services: tty: true stdin_open: true environment: - TZ: ${TZ:-Asia/Tokyo} + TZ: ${TZ:-Etc/UTC} WINEARCH: win64 WINEPREFIX: /var/opt/wineprefix64 WINEDEBUG: -all @@ -18,7 +18,10 @@ services: SERVER_CLI_INPUT_MODE: ${SERVER_CLI_INPUT_MODE:-stream} # minimum required virtual screen XVFB_DISPLAY: ${XVFB_DISPLAY:-:99} - XVFB_SCREEN: ${XVFB_SCREEN:-64x64x16} + XVFB_SCREEN: ${XVFB_SCREEN:-720x1280x16} + # ip & port the server will run on + SERVER_BIND_IP: ${SERVER_BIND_IP:-0.0.0.0} + SERVER_PORT: ${SERVER_PORT:-25565} volumes: # - wineprefix64:/var/opt/wineprefix64 - ./server-data:/srv/persist diff --git a/docker/dedicated-server/entrypoint.sh b/docker/dedicated-server/entrypoint.sh index 26b40da9..0eece274 100644 --- a/docker/dedicated-server/entrypoint.sh +++ b/docker/dedicated-server/entrypoint.sh @@ -3,9 +3,8 @@ set -euo pipefail SERVER_DIR="/srv/mc" SERVER_EXE="Minecraft.Server.exe" -# ip & port are fixed since they run inside the container -SERVER_PORT="25565" -SERVER_BIND_IP="0.0.0.0" +SERVER_PORT="${SERVER_PORT:-25565}" +SERVER_BIND_IP="${SERVER_BIND_IP:-0.0.0.0}" PERSIST_DIR="/srv/persist" WINE_CMD="" From c4c4c08b960276d1ecf10fcd18d6ae77ff90841b Mon Sep 17 00:00:00 2001 From: Sylvessa <225480449+sylvessa@users.noreply.github.com> Date: Thu, 2 Apr 2026 00:01:27 -0500 Subject: [PATCH 5/7] Revert "Update actions workflows and add clang format check for PRs (#1418)" This reverts commit 38d58f2d8bb8af5516671b42940279d4e582d9c7 due to it causing spam and other problems with pull requests. --- .github/workflows/clang-format.yml | 48 ---------------------------- .github/workflows/nightly-server.yml | 11 +++---- .github/workflows/nightly.yml | 11 +++---- .github/workflows/pull-request.yml | 10 +++--- 4 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/clang-format.yml diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index a01bada4..00000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Check formatting - -on: - pull_request: - paths: - - '**' - - '!.gitignore' - - '!*.md' - - '!.github/**' - - '.github/workflows/clang-format.yml' - -permissions: - contents: read - pull-requests: write - -jobs: - format-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Fetch base commit - run: git fetch origin ${{ github.event.pull_request.base.sha }} - - - name: Install clang-format-20 - run: | - wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc - sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" - sudo apt-get install -y -qq clang-format-20 - - - uses: reviewdog/action-setup@v1 - - - name: Check formatting on changed lines - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git clang-format-20 --binary clang-format-20 \ - --diff ${{ github.event.pull_request.base.sha }} -- \ - '*.c' '*.cpp' '*.cc' '*.h' '*.hpp' \ - | reviewdog \ - -name="clang-format" \ - -f=diff \ - -reporter=github-pr-check \ - -fail-level=error \ - -filter-mode=added diff --git a/.github/workflows/nightly-server.yml b/.github/workflows/nightly-server.yml index 0fc20eb1..5450de9a 100644 --- a/.github/workflows/nightly-server.yml +++ b/.github/workflows/nightly-server.yml @@ -5,12 +5,11 @@ on: push: branches: - 'main' - paths: - - '**' - - '!.gitignore' - - '!*.md' - - '!.github/**' - - '.github/workflows/nightly-server.yml' + paths-ignore: + - '.gitignore' + - '*.md' + - '.github/**' + - '!.github/workflows/nightly-server.yml' permissions: contents: write diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a5b53be0..789db3e8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,12 +5,11 @@ on: push: branches: - 'main' - paths: - - '**' - - '!.gitignore' - - '!*.md' - - '!.github/**' - - '.github/workflows/nightly.yml' + paths-ignore: + - '.gitignore' + - '*.md' + - '.github/**' + - '!.github/workflows/nightly.yml' permissions: contents: write diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3b5398a0..9d57f4b4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,12 +4,10 @@ on: workflow_dispatch: pull_request: types: [opened, reopened, synchronize] - paths: - - '**' - - '!.gitignore' - - '!*.md' - - '!.github/**' - - '.github/workflows/pull-request.yml' + paths-ignore: + - '.gitignore' + - '*.md' + - '.github/*.md' jobs: build: From e4c08b8414f662a340005428dda81440a2ad140f Mon Sep 17 00:00:00 2001 From: Logan Gibson Date: Thu, 2 Apr 2026 00:43:33 -0700 Subject: [PATCH 6/7] Replace instances of hard-coded port in ports variable with SERVER_PORT variable in yml files (#1457) --- docker-compose.dedicated-server.ghcr.yml | 4 ++-- docker-compose.dedicated-server.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.dedicated-server.ghcr.yml b/docker-compose.dedicated-server.ghcr.yml index 7a9a95b2..f311f834 100644 --- a/docker-compose.dedicated-server.ghcr.yml +++ b/docker-compose.dedicated-server.ghcr.yml @@ -22,8 +22,8 @@ services: # - wineprefix64:/var/opt/wineprefix64 - ./server-data:/srv/persist ports: - - "25565:25565/tcp" - - "25565:25565/udp" + - "$SERVER_PORT:$SERVER_PORT/tcp" + - "$SERVER_PORT:$SERVER_PORT/udp" stop_grace_period: 30s # volumes: diff --git a/docker-compose.dedicated-server.yml b/docker-compose.dedicated-server.yml index 3dbe8bf6..23caf26f 100644 --- a/docker-compose.dedicated-server.yml +++ b/docker-compose.dedicated-server.yml @@ -26,8 +26,8 @@ services: # - wineprefix64:/var/opt/wineprefix64 - ./server-data:/srv/persist ports: - - "25565:25565/tcp" - - "25565:25565/udp" + - "$SERVER_PORT:$SERVER_PORT/tcp" + - "$SERVER_PORT:$SERVER_PORT/udp" stop_grace_period: 30s # volumes: From 8bf034354426d5e3c2bf30fd755136e78f976fc0 Mon Sep 17 00:00:00 2001 From: Sylvessa <225480449+sylvessa@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:16:31 -0500 Subject: [PATCH 7/7] fix: boat plr height & sneak height (#1459) --- Minecraft.Client/HumanoidModel.cpp | 2 +- Minecraft.Client/ItemInHandRenderer.cpp | 14 ++++++++++++++ Minecraft.Client/PlayerRenderer.cpp | 17 ++++++++++++++++- Minecraft.World/Boat.cpp | 2 +- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/HumanoidModel.cpp b/Minecraft.Client/HumanoidModel.cpp index c6c6b9f4..f44654c3 100644 --- a/Minecraft.Client/HumanoidModel.cpp +++ b/Minecraft.Client/HumanoidModel.cpp @@ -241,7 +241,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float if (riding) { - if(uiBitmaskOverrideAnim&(1<xRot += -HALF_PI * 0.4f; arm1->xRot += -HALF_PI * 0.4f; diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index 13d4fc20..749337da 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -286,6 +286,20 @@ void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptrgetAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel)) + { + if (mob->isRiding()) + { + std::shared_ptr ridingEntity = mob->riding; + if (ridingEntity != nullptr) // Safety check; + { + yo += 0.3f; // reverts the change in Boat.cpp for smaller models. + } + } + } glEnable(GL_RESCALE_NORMAL); glTranslatef(-xo, -yo, 0); diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index 23dff77f..bc4c61a7 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -199,11 +199,26 @@ void PlayerRenderer::render(shared_ptr _mob, double x, double y, double armorParts1->sneaking = armorParts2->sneaking = humanoidModel->sneaking = mob->isSneaking(); double yp = y - mob->heightOffset; - if (mob->isSneaking() && !mob->instanceof(eTYPE_LOCALPLAYER)) + if (mob->isSneaking()) { yp -= 2 / 16.0f; } + if (mob->getAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel)) + { + if (mob->isRiding()) + { + std::shared_ptr ridingEntity = mob->riding; + if (ridingEntity != nullptr) // Safety check; + { + if (ridingEntity->instanceof(eTYPE_BOAT)) + { + yp += 0.25f; // reverts the change in Boat.cpp for smaller models. + } + } + } + } + // Check if an idle animation is needed if(mob->getAnimOverrideBitmask()&(1<