From 15baff85595bbc72dad66f185d7921d8548c82b6 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Wed, 9 Mar 2011 01:05:06 +0000 Subject: [PATCH] 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 --- src/main/java/net/minecraft/server/EntityTrackerEntry.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java index 97ba043633..317847248d 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -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) {