From 572c02b06bae841dce51db0a65a7fb3887741400 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Wed, 10 Jul 2019 19:56:39 +1000 Subject: [PATCH] MC-155077, SPIGOT-5113: EntityTracker desync --- nms-patches/PlayerChunkMap.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/PlayerChunkMap.patch b/nms-patches/PlayerChunkMap.patch index 4890150367..78505d204d 100644 --- a/nms-patches/PlayerChunkMap.patch +++ b/nms-patches/PlayerChunkMap.patch @@ -121,6 +121,15 @@ this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); +@@ -1109,7 +1112,7 @@ + + public void updatePlayer(EntityPlayer entityplayer) { + if (entityplayer != this.tracker) { +- Vec3D vec3d = (new Vec3D(entityplayer.locX, entityplayer.locY, entityplayer.locZ)).d(this.trackerEntry.b()); ++ Vec3D vec3d = (new Vec3D(entityplayer.locX, entityplayer.locY, entityplayer.locZ)).d(this.tracker.ci()); // MC-155077, SPIGOT-5113 // PAIL getPositionVector + int i = Math.min(this.trackingDistance, (PlayerChunkMap.this.viewDistance - 1) * 16); + boolean flag = vec3d.x >= (double) (-i) && vec3d.x <= (double) i && vec3d.z >= (double) (-i) && vec3d.z <= (double) i && this.tracker.a(entityplayer); + @@ -1125,6 +1128,17 @@ } }