From ef8f4b6f77f0e80c51a53dfaee2faed51bc81e08 Mon Sep 17 00:00:00 2001 From: Pyogenics Date: Mon, 9 Mar 2026 17:56:18 +0000 Subject: [PATCH 1/3] Fix error where rmtree is called in an awkward setup --- scripts/copy_assets_to_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/copy_assets_to_client.py b/scripts/copy_assets_to_client.py index 9670a2dcb..6e69231f4 100644 --- a/scripts/copy_assets_to_client.py +++ b/scripts/copy_assets_to_client.py @@ -23,11 +23,11 @@ src_assets = Path(project_source_root / "Minecraft.Assets") # clear out any old assets if dest_common.exists(): - shutil.rmtree(dest_common) - shutil.rmtree(client_build_dir / "music") - shutil.rmtree(client_build_dir / "Sound") + shutil.rmtree(dest_common, ignore_errors=True) + shutil.rmtree(client_build_dir / "music", ignore_errors=True) + shutil.rmtree(client_build_dir / "Sound", ignore_errors=True) # XXX: Check "copy DLC" bellow for info - # shutil.rmtree(client_build_dir / "DurangoMedia") + # shutil.rmtree(client_build_dir / "DurangoMedia", ignore_errors=True) # copy `Minecraft.Assets/Common` into the build directory for the client. shutil.copytree( From 9c254bbf4d7c9d62d3d6689bfad81e6cadf92432 Mon Sep 17 00:00:00 2001 From: MathiewMay Date: Mon, 9 Mar 2026 15:34:08 -0400 Subject: [PATCH 2/3] SetEntityMotionPacket::write() was sending raw entity ID without masking, changing it to mask the ID to 11 bits first since large entity IDs were accidentally setting the compression flag bit and causing wrong number of bytes to be read by receiver. --- Minecraft.World/Network/Packets/SetEntityMotionPacket.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Minecraft.World/Network/Packets/SetEntityMotionPacket.cpp b/Minecraft.World/Network/Packets/SetEntityMotionPacket.cpp index bff87c5bd..cb6d2a42c 100644 --- a/Minecraft.World/Network/Packets/SetEntityMotionPacket.cpp +++ b/Minecraft.World/Network/Packets/SetEntityMotionPacket.cpp @@ -73,18 +73,20 @@ void SetEntityMotionPacket::read(DataInputStream *dis) //throws IOException } } -void SetEntityMotionPacket::write(DataOutputStream *dos) //throws IOException +void SetEntityMotionPacket::write(DataOutputStream *dos) //throws IOException { if( useBytes ) { - dos->writeShort(id | 0x800); + // Masking the id to 11 bits before writing to account for large entitty ids. + dos->writeShort((id & 0x07FF) | 0x800); dos->writeByte(xa/16); dos->writeByte(ya/16); dos->writeByte(za/16); } else { - dos->writeShort(id); + // same thing as line 80 here + dos->writeShort((id & 0x07FF)); dos->writeShort(xa); dos->writeShort(ya); dos->writeShort(za); From 97729d5b236ee31ffb43e03681d33df3f7fa6fb0 Mon Sep 17 00:00:00 2001 From: Schweeeeeeeeeeeeeeee <88291316+Schweeeeeeeeeeeeeeee@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:51:07 +0100 Subject: [PATCH 3/3] Add missing python3 dependency to flake.nix --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 24d0e6679..9897d7fc6 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ libvorbis ]; packages = with pkgs; [ + python3 gcc15 lld cmake