2019-06-25 04:14:30 +00:00
|
|
|
From 3944ba91d8551e8ca5d4f0ec0a675107d3e08aca Mon Sep 17 00:00:00 2001
|
2019-06-24 02:32:10 +00:00
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Sun, 23 Jun 2019 19:11:27 -0700
|
|
|
|
Subject: [PATCH] Fix tracker desync issue
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2019-06-25 01:47:58 +00:00
|
|
|
index 69bfa19274..c5198af94b 100644
|
2019-06-24 02:32:10 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2019-06-25 01:47:58 +00:00
|
|
|
@@ -3255,6 +3255,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
2019-06-24 02:32:10 +00:00
|
|
|
return this.f.j();
|
|
|
|
}
|
|
|
|
|
2019-06-25 01:47:58 +00:00
|
|
|
+ public Vec3D getPositionVector() { return this.ci(); } // Paper - OBFHELPER
|
|
|
|
public Vec3D ci() {
|
2019-06-24 02:32:10 +00:00
|
|
|
return new Vec3D(this.locX, this.locY, this.locZ);
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
2019-06-25 01:47:58 +00:00
|
|
|
index f34d7d0dad..8e16d6ac87 100644
|
2019-06-24 02:32:10 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
2019-06-25 01:47:58 +00:00
|
|
|
@@ -1238,7 +1238,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
2019-06-24 02:32:10 +00:00
|
|
|
public void updatePlayer(EntityPlayer entityplayer) {
|
|
|
|
org.spigotmc.AsyncCatcher.catchOp( "player tracker update"); // Spigot
|
|
|
|
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.getPositionVector()); // Paper - prevent de-sync issues
|
|
|
|
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);
|
|
|
|
|
|
|
|
--
|
2019-06-25 01:47:58 +00:00
|
|
|
2.22.0
|
2019-06-24 02:32:10 +00:00
|
|
|
|