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

Receiving item from villager counts as crafting

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.10.2, Minecraft 16w39c, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w12b, Minecraft 19w13b
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When you trade an item with a villager the crafting stat for the received item increases.

      How to reproduce

      1. Summon a villager
        /summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"stone",Count:1b},sell:{id:"stone",Count:1b},maxUses:2147483647}]}}
        
      2. Setup the scoreboard objective
        /scoreboard objectives add craftedStone minecraft.crafted:minecraft.stone
        /scoreboard objectives setdisplay sidebar craftedStone
        
      3. Trade with the villager
        → The score increases

      The reason

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

      The method net.minecraft.inventory.SlotMerchantResult.onCrafting(ItemStack) calls the method net.minecraft.item.ItemStack.onCrafting(World, EntityPlayer, int).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: