mojira.dev
MC-74153

Reloading a chunk with a map inside item frame duplicates map marker

After applying my patch to MC-3416 that draws the map markers in front of the map instead of behind it, @unknown was able to take this screenshot that reveals that map markers have been duplicated:

[media]

After a simple test I have a found a way to replicate this bug in vanilla:

  1. Create a new regular superflat world

  2. /tp 0 5 -200

  3. /setworldspawn

    • (to make sure 0,0 gets unloaded)

  4. /tp 5 5 5

  5. Create a map and put a copy in a frame, leaving one copy in your hand.

  6. /tp 5 5 200

  7. /tp 5 5 5

    • Repeat last two steps twice.

  8. Drop the map from your inventory and pick it up again

Your marker has now disappeared, because MC-3416 hides all markers except the first four and reloading the chunk three times has now duplicated the marker in the frame to fill slots 1-4.

I took some additional screenshots after a command block machine had teleported me back and forth for some time, which demonstrate both MC-3416 and this bug: The map marker has been duplicated and the markers are being offset in the wrong direction.


Code analysis by @unknown in this comment.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media]
kumasasa

Is this still an issue in the current Minecraft Snapshot 15w47c or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

marcono1234

Confirmed for

  • 1.10 (MCP)

The way to reproduce does not work anymore. You can modify the method net.minecraft.client.gui.MapItemRenderer.Instance.render(boolean) to see that, offsetting a decoration object based on its index.

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason why this happens is because the method net.minecraft.world.storage.MapData.updateDecorations(int, World, String, double, double, double) uses the entity id to track whether or not a marker of a map was added. The problem is that every time an entity in loaded, it gets last used entity id + 1. This means after unloading and reloading the chunk the item frame is in, it has a different entity id and the marker is added again. Using the UUID instead would probably work.

[Mod] Neko

Is this still an issue in the most recent versions (currently that is 1.11) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

migrated

Affects 1.12. As mentioned above, since the arrows no longer stack, the original method to produce no longer works, but the easiest way to see the arrow duplication is to do it in the Nether. See attached screenshot.

migrated

Affects 1.12.2.

Uriel Salischiker

Is this still a issue in the latest version of the game(currently 1.13.1)?

If so, please add it to the affected versions, thanks!

migrated

This seems to be fixed in 1.13.1 along with the other map marker bugs (MC-73 and MC-1528). Hooray!

migrated

(Unassigned)

Unconfirmed

Minecraft 1.8, Minecraft 1.8.1-pre4, Minecraft 1.8.1-pre5, Minecraft 1.8.1, Minecraft 1.8.2-pre1, ..., Minecraft 1.8.2-pre7, Minecraft 1.8.2, Minecraft 1.8.3, Minecraft 15w47c, Minecraft 1.12.2

Minecraft 1.13.1

Retrieved