mojira.dev
MC-106683

map_tracking_position tag of filled maps is not read when map_scale_direction is provided

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

The bug

The tag map_tracking_position is not read from a filled_map if the tag map_scale_direction is provided. This is kind of strange because they don't preclude each other. The value of map_scale_direction is added to the scale and map_tracking_position determines whether or not a marker for the player should be added to the map and updated.

Affected method: net.minecraft.item.ItemMap.onCreated(ItemStack, World, EntityPlayer)

How to reproduce

  1. Use the following command

    /give @p filled_map 1 32767
  2. Look at the map, its scale should be 3/4 and it should not show your position

  3. Replace "###" with the data value of the map you just gave you

    /setblock ~ ~ ~ furnace default replace {Items:[{Slot:2b,id:"filled_map",Count:1b,Damage:###s,tag:{map_scale_direction:1,map_tracking_position:1b}}]}
  4. Look at the map
    → You will see that only map_scale_direction changed the map (3/4 scale became 4/4) scale

To prove that the map_tracking_position tag works:

  1. Use the following command

    /give @p filled_map 1 32767
  2. Look at the map, its scale should be 3/4 and it should not show your position

  3. Replace "###" with the data value of the map you just gave you

    /setblock ~ ~ ~ furnace default replace {Items:[{Slot:2b,id:"filled_map",Count:1b,Damage:###s,tag:{map_tracking_position:1b}}]}
  4. Look at the map
    → The map tracks now your position

Comments 1

It appears in 20w07a (and probably earlier) the mentioned method MapItem.onCraftedBy(ItemStack, Level, Player) (Mojang name) does not read whether the map should track the position anymore. It is only stored in the map data as trackingPosition and appears to be read correctly.

marcono1234

(Unassigned)

Confirmed

(Unassigned)

NBT, filled_map, tag

Minecraft 1.10.2, Minecraft 1.11

Retrieved