Mojira Archive
MC-117653

Recipes and advancements are not granted while most GUIs are open

When crafting or otherwise obtaining items with the inventory GUI open, recipes and advancements are acquired/unlocked instantly. When most other GUIs are open, they are not granted until the GUI is closed.

GUIs tested: ✓ = Grants instantly, ✗ = Granted only when closing GUI

✓ Player Inventory
✓ Sign
✓ Writable Book (Book and Quill)
✓ Command Block/Structure Block
✓ Pause Menu (game menu, options, resource packs, etc)
✗ Crafting Table
✗ Brewing Stand
✗ Anvil
✗ Enchanting Table
✗ Beacon
✗ Hopper
✗ Dropper/Dispenser
✗ Chest/Trap Chest/Ender Chest/Shulker Box

It looks like this bug may affect GUIs that have their own inventory. Other GUIs such as Sign and the player inventory are unaffected.

Steps to reproduce:

  • Start a new world
    Alternatively reset your recipes and inventory _(since 1.12-pre5) _
    /clear @s
    /recipe take @s *
    /advancement revoke @s from recipes/root
      
  • Punch wood
  • Unlocks planks recipe
  • Open inventory
  • Craft planks
    Note new recipes unlock instantly (without closing gui) (crafting table, sticks, button, pressure plate)
  • Craft a Crafting Table and some more planks
  • Close inventory
  • Place down Crafting Table and open its GUI
  • Craft sticks in the crafting bench (leaving enough planks for making tools)
    Note that nothing unlocks
  • Close the Crafting Table GUI
    Note that new recipes unlock (wooden tools, fences, ladders)

Other scenarios: (using summon to simulate picking up items)

  • Have sticks in your inventory
  • Summon some coal above you before opening your inventory
    /summon Item ~ ~50 ~ {Item:{id:coal,Count:64}}
    

    Note that the torch recipe unlocks instantly (with inventory open)

  • Place down/go to a crafting table
  • Summon some iron and open the crafting table GUI
    /summon Item ~ ~50 ~ {Item:{id:iron_ingot,Count:64}}
    

    Note no recipe unlocks

  • Close crafting GUI
    Note iron recipes unlock
    Note receive advancement "acquire hardware"
  • Summon in some string and open inventory
    /summon Item ~ ~50 ~ {Item:{id:string,Count:64}}
    

    Note instantly receive recipes for wool and bows

  • Summon some diamonds and open the inventory
    /summon Item ~ ~50 ~ {Item:{id:diamond,Count:64}}
    

    Note diamond recipes unlock
    Note receive advancement "DIAMONDS!"
    Note inventory still open