3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 21:10:17 +01:00

Fix the "Ghost minecart" issue.

This reverts commit 73647864179cbab9f340044e9d33add445fbe774 - "Ignore entity movement packets if distance == 0"

This a commit introduced an intermittent bug which has caused minecart ghosting - they are invisible until you interact with them physically. This is described in leaky bugs:
http://leaky.bukkit.org/issues/547
http://leaky.bukkit.org/issues/563

And caused by the fact that normally when loading a chunk, entities fall with gravity before the block data has been loaded, and are sent a zero-distance packet to reset their positions. See Issue #190:
https://github.com/Bukkit/CraftBukkit/issues/#issue/190
Dieser Commit ist enthalten in:
Nicholas Devenish 2011-03-09 01:05:06 +00:00 committet von Erik Broes
Ursprung 69cbe7d222
Commit 15baff8559

Datei anzeigen

@ -70,11 +70,6 @@ public class EntityTrackerEntry {
Object object = null;
boolean flag = Math.abs(i) >= 8 || Math.abs(j) >= 8 || Math.abs(k) >= 8;
boolean flag1 = Math.abs(l - this.g) >= 8 || Math.abs(i1 - this.h) >= 8;
// CraftBukkit - Create relative movement packet only if distance is greater than zero.
int distanceSquared = j1*j1+k1*k1+l1*l1;
flag = (distanceSquared > 0) && flag;
// CraftBukkit stop
if (j1 >= -128 && j1 < 128 && k1 >= -128 && k1 < 128 && l1 >= -128 && l1 < 128) {
if (flag && flag1) {