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

The recipe book doesn't move ingredients that have NBT data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.12.2, 1.15.1 Pre-release 1, 20w12a, 20w13b, 20w15a, 20w17a, 1.16.1, 1.16.2, 1.17.1
    • None
    • Confirmed
    • Crafting, UI

      Since the beginning of version 1.12 and the introduction of the Recipe Book, there is a bug related to this book that prevents ingredients containing NBT data from being automatically transferred to the crafting grid when clicking on a book.
      The following video shows the bug with leather containing a compound tag :
      https://streamable.com/x2t23
      The recipes are normally not sensitive to NBT data, which allows the recipe but prevents adding the ingredients.
      The error is only server side and related to a player inventory method that is only used for the recipe book.
      Related MCP Mappings :

      PlayerInventory.findSlotMatchingUnusedItem(ItemStack p_194014_1_)
      ServerRecipeBookHelper.func_194325_a(Slot p_194325_1_, ItemStack p_194325_2_)
      

      Affected method: net.minecraft.world.entity.player.Inventory.findSlotMatchingUnusedItem(ItemStack) (Mojang name)
      The check Inventory.isSameItem(ItemStack, ItemStack) makes all subsequent checks irrelevant.

            Unassigned Unassigned
            Corail31 Corail
            Votes:
            12 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: