From 729c6ac07266364567478c6d04ba95ca7b82ec71 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:38:03 +0800 Subject: [PATCH] Fix build --- ...0011-Fix-Pufferfish-and-Purpur-patches.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch b/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch index 96f20c199..5eb6e4113 100644 --- a/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch +++ b/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch @@ -322,3 +322,20 @@ index 75af21644eaf78abdebd722b671f3c47aa083a25..c55757f0a24a0b5c06333070f5875e7d + return text("Previous: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); // Purpur } } +diff --git a/src/main/java/org/purpurmc/purpur/controller/LookControllerWASD.java b/src/main/java/org/purpurmc/purpur/controller/LookControllerWASD.java +index b8c25c96e95dd5ec3ad9fa4c41bd6c08e144832d..2f7332b94940e7c05c5e9f82ffda0bc8398717d7 100644 +--- a/src/main/java/org/purpurmc/purpur/controller/LookControllerWASD.java ++++ b/src/main/java/org/purpurmc/purpur/controller/LookControllerWASD.java +@@ -42,7 +42,11 @@ public class LookControllerWASD extends LookControl { + entity.xRotO = entity.getXRot(); + entity.yRotO = entity.getYRot(); + +- entity.tracker.broadcast(new ClientboundMoveEntityPacket ++ // Leaf start - Fix ++ net.minecraft.server.level.ServerLevel world = (net.minecraft.server.level.ServerLevel) this.entity.level(); ++ net.minecraft.server.level.ChunkMap.TrackedEntity tracker = world == null ? null : world.getChunkSource().chunkMap.entityMap.get(this.entity.getId()); ++ tracker.broadcast(new ClientboundMoveEntityPacket ++ // Leaf end - Fix + .PosRot(entity.getId(), + (short) 0, (short) 0, (short) 0, + (byte) Mth.floor(entity.getYRot() * 256.0F / 360.0F),