Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 29, 2024
1 parent 53cec81 commit 729c6ac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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),

0 comments on commit 729c6ac

Please sign in to comment.