mojira.dev
MC-134115

Containers next to chunk borders can lose items when upgrading

  1. Create a world in 1.12.2

  2. Put a large chest in a chunk edge and fill it with blocks

  3. Open it in 1.13 and half the chest content will disappear

I am facing west when placing the chest if that makes sense. I have two item frames on it as well.

Linked issues

Attachments

Comments 21

Håvard Orskaug

I can confirm that this happened on my realm server as well. My brother lost items from his chest when we updated the map to 1.13.

Martin Olofsson

I would like to refer to MC-133880. It is not the same issue, but might be a similar solution to that problem. That issue does also only affect blocks in chunk edges.

After running a world with such chest through an 'optimize world' option, the chest appears to be invisible; these two bugs might be correlated.

When I optimized my 1.12.2 world for 1.13 the contents didn't disappear but some chests got the upper and lower halves of their content switched. Didn't happen to all of them, but I'm not sure the ones where it happened were all on chunk borders.

Also affects other containers e.g. hoppers

11 more comments

AFAIK, the current issue only affects double wide containers that span two chunks (i.e. double chests).

After many hours of taking cracks at this, I finally figured it out

This is now fixed in Paper version 275+

https://papermc.io/ci/job/Paper-1.13/

I sent to Dinnerbone and Grum, but for anyone else interested, here is the fix:

https://gist.github.com/aikar/5da731bc0fb3dbd322fac5d15689ffef

 

I'd like to propose a different fix that gets closer to the root of the issues and fixes it more broadly, namely:

 

  1. Tile entities get added to chunks with mutable block positions that are then later changed by the converter, resulting in bad state

  2. The ordering of access across chunks is not well defined, and the converter may run conversions back and forth across different pairs of chunks depending on how the bordering edges are populated (e.g. a chunk with tiles crossing over on all edges).

 

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/eea43870346d11b7f8cf6cc4bf516e406c3ec006

Future Version - 1.14 should be removed from fix versions, as it's fixed in 1.13.2-pre1.

Jack McKalling

I think the fix was added to different forks of the codebase at once, hence why two fixes were set. Because they were already working on 1.14 before they made this change to the 1.13 branch

 

Martin Olofsson

Fry

Confirmed

chest, chunk-border, hopper, item

Minecraft 1.13, Minecraft 1.13.1

Minecraft 18w30a, Minecraft 1.13.2-pre1

Retrieved