The MC-Client will ignore specific packages if there is not a minimum amount of time between them (i suspect a client-side game tick and two packet queues depending on destroy or create events. Rather than using only one queue to keep the packetsequence in order).
Unfortunately i dont know how to reproduce this problem without altering the server code. In theory it works by:
Case 1 (Problem occuring) :
1. Having an entity ( ID = 1)
2. Sending a destroy-packet ( ID = 1)
3. Sending a spawn-packet (ID = 1)
The spawn-packet will be ignored and the client wont track the entity with ID = 1 again.
(This might happen with network instability or high-pings and routing-changes)
Case 2 (No Problem occuring)
This does not happen if:
1. Having an entity ( ID = 1)
2. Sending a destroy-packet ( ID = 1)
3. Wait some milliseconds on the server-process
3. Sending a spawn-packet (ID = 1)
Code Example for # Case 1:
Packet destroy = new PacketPlayOutEntityDestroy(entityId);
player.sendPacket(destroy);
Packet packet = new PacketPlayOutSpawnEntityLiving(entityLiving);
player.sendPacket(packet);
Code Example for # Case 2:
Packet destroy = new PacketPlayOutEntityDestroy(entityId);
player.sendPacket(destroy);
Thread.sleep(50);
Packet packet = new PacketPlayOutSpawnEntityLiving(entityLiving);
player.sendPacket(packet);
Workaround
As this problem is dependent on the entity-ID it is possible to trick the client by changing the entity-ID
1. Having an entity ( ID = 1)
2. Sending a destroy-packet ( ID = 1)
3. Change the ID of the entity fom 1 to 2
4. Sending a spawn-packet (ID = 2)
This scenario will not present the bug.
This Bug can result in some common things like:
Items that are impossible to pick up
Invisible entities/players for some players
Visible entities a player is not able to interact with
This might be considered a duplicate of MC-65040 but as this ticket describes a very specific way to create this condition it may be either another problem or a sub-problem because MC-65040 might be caused by different things.
Linked issues
Comments 2
I did not try this with Vanilla Server but I can confirm with a Paper Server that the Vanilla Minecraft Client up to 1.11.2 has a problem with too fast packets.
I'm running the latest Paper on Debian in my local network. Around one third of the drops from broken blocks or dropped items disappears. The drops have no bounding box and F3+A doesn't help, they simply vanish, but reappear on relog and I can pick them up while they are invisible. External connections don't have this problem, just my Windows 10 Laptop with i7-4702MQ and Nvidia 760M GTX when connecting from inside the network with a 1ms Ping. After reading this issue I added a small 5ms delay to the Server network interface using the command "tc qdisc add dev eth0 root netem delay 5ms". Nothing else was changed in Client, Server or Debian. Since then, the problem never appeared again.
Is this still an issue in the most recent versions (i.e. 1.10.2, or 16w42a) of Minecraft?