mojira.dev
MC-4

Item drops sometimes appear at the wrong location

The bug

When an item lands on the edge of a block, the client sometimes makes it fall over the edge while the server leaves it on the edge. This happens because the client thinks the drop can fall based on a slightly different location and attempts to predict the future incorrectly.

How to reproduce

  1. Throw an item on the ground and wait until it stopped moving

  2. Run in command block close to it:

    teleport @e[type=item,distance=..6] ~ ~1 ~-0.6249

Code analysis

Code analysis by @unknown can be found in this comment.

Fix

Fix by @unknown can be found in this comment.

Linked issues

MC-255892 water can't push items at the edge of block Resolved MC-119318 Items can't be picked up in some cases Resolved MC-266415 Reminder: Item drops sometimes appear in the wrong location. Resolved MC-259534 stack too many items in a small area to generate ghost item leak out from the bottom of block Resolved MC-222920 items are behaving really weird Resolved
MC-249200 Several entities constantly deviate visually from their actual positions on the client when teleported Resolved MC-106013 Item falling through boats Open MC-124375 Teleportation of item entity all ticks visually broken Open MC-173571 Regression with collision boxes of moved blocks sometimes prevent items/entities to fall through Open MC-258368 When an item is thrown onto a big dripleaf which adjacent to a sculk sensor, the item go through the leaf Open

Attachments

Comments 322

I have a piston-powered automated sugarcane farm which reproduces this very reliably.

What if there is flowing water where the ghost item falls? Will this ghost item move?

Yes, water moves the ghost items on my sugarcane farm.

Click the button of the diamond sugarcane farm. Most of the time, there will be ghost items.

I have attached a world save with a sugarcane farm which reproduces this most of the time. Demo video: http://www.youtube.com/watch?v=S1IHkLQIqOs

312 more comments

Can confirm in 25w45a

Sorry, didn't see the previous comment saying "Will not be updating this with all pre-release and snapshot versions". :(

Despite being ‘fixed’ in the latest snapshot the bug is still there. This is version 26.3 snapshot 1, in a single biome world with dappled forest selected.

Wow, I’m so happy to see the oldest bug in the game fixed! ⭐

Ezekiel

FiskFille

Confirmed

Platform

Low

Entities, Items, Networking

desync, item-entity, packet, precision-loss, server

Minecraft 1.4.1, Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, , 1.21.6, 1.21.7, 1.21.8, 25w31a, 1.21.10

Minecraft 1.8.1-pre1, 26.3 Snapshot 1

Retrieved