276afaa2ea
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c2d72c82 SPIGOT-3102: Add EXPLOSION SpawnReason CraftBukkit Changes:fca41573
SPIGOT-5136: EntityPortalEvent getting called on interdimensional entity teleports604c8bf0
SPIGOT-3102: Add EXPLOSION SpawnReason375969a6
Re-add chunk GC for plugin chunk loads58151368
SPIGOT-5123: Snapshot tile entities can end up with a non-null world491c8482
SPIGOT-5130: PersistentDataContainer not removing values on TileEntities Spigot Changes: d05d3c1f Rebuild patches
35 Zeilen
1.9 KiB
Diff
35 Zeilen
1.9 KiB
Diff
From 8e3c5764f6a63ca9302d36608291a1f7afd77bc1 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index b2a2090e79..0a2c9a9f85 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -3258,6 +3258,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
return this.f.j();
|
|
}
|
|
|
|
+ public Vec3D getPositionVector() { return this.ci(); } // Paper - OBFHELPER
|
|
public Vec3D ci() {
|
|
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
|
|
index f34d7d0dad..8e16d6ac87 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
@@ -1238,7 +1238,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
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);
|
|
|
|
--
|
|
2.22.0
|
|
|