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

Scoreboard ItemCrafted Bug (when right clicking in crafting table)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20.4
    • None
    • Unconfirmed
    • (Unassigned)

      Is this a bug in Minecraft? 

      If I do /scoreboard objectives add crafting minecraft.crafted:minecraft.redstone,

      I craft a redstones using redstone block in the crafting menu, but I right click the result slot and it only increases my score by 5. Left clicking increases by 9 correctly as 1 red stone block fetches 9 redstone. This was what I read in the code and went in game to confirm this issue. 

      (right click gives 5 because it's trying to split the result slot but it shouldn't be able to because it's crafting it)

      or is it some sort of feature?

       

       

      This can be traced back in ResultSlot class, as under the "remove" method, the parameter p_40173_ is taking both primary and secondary (splitting) values. As seen in line 414 & 415 in AbstractContainerMenu class.

       

      This is important because the remove method sets the removeCount as the j3 value (and since right click splits the amount, it's halved). The removeCount is later used to trigger the scoreboard achievement , so the scoreboard achievement is not accurate to what's crafted.

       

      (removeCount being set as the min value - which is the split value)

       

      (line 43 triggers the scoreboard increment)

       

       

       

      I have attached a video below, the first time, I right clicked the ResultSlot and you can see, the crafting value increased by 5. The second time, I used left click and it's what it should be, 9 because I crafted 9 redstones.

       

       

        1. 2023-12-25 17-42-07.mp4
          7.18 MB
          Astero
        2. image-2023-12-25-17-30-20-653.png
          23 kB
          Astero
        3. image-2023-12-25-17-30-26-500.png
          23 kB
          Astero
        4. image-2023-12-25-17-41-09-007.png
          69 kB
          Astero
        5. image-2023-12-25-17-47-59-541.png
          25 kB
          Astero
        6. image-2023-12-25-17-48-26-334.png
          25 kB
          Astero
        7. image-2023-12-25-17-50-00-675.png
          23 kB
          Astero
        8. image-2023-12-25-17-51-23-100.png
          69 kB
          Astero

            Unassigned Unassigned
            Astero Astero
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: