mojira.dev
MC-108079

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

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

Comments 0

No comments.

Marcono1234

Agnes Larsson

Confirmed

crash, filled_map, furnace, map, villager

Minecraft 16w39c

Minecraft 16w40a

Retrieved