Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-108079

Crash when trading or picking up filled map with invalid data value from furnace

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      When you receive a filled map with an invalid data value and either the map_scale_direction (int) or the map_tracking_position (byte) tag from a villager or pick it up from the output slot of a furnace Minecraft crashes.

      How to reproduce

      1. Use the following command
        /setblock ~ ~ ~ furnace default replace {Items:[{Slot:2b,id:"filled_map",Count:1b,Damage:32767s,tag:{map_tracking_position:1b}}]}
        
      2. Pick up the map

      The reason

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

      The methods net.minecraft.item.ItemMap.scaleMap(ItemStack, World, int) and net.minecraft.item.ItemMap.enableMapTracking(ItemStack, World) try to get the map data with the used data value, as it does not exist and the client will not create it, it is null and a NullPointerException occurs when the methods try to get the values of its fields.

        Attachments

          Activity

            People

            Assignee:
            FruBasilicum [Mojang] Agnes Larsson
            Reporter:
            marcono1234 [Mod] Marcono1234
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: