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

"inventory_changed" does not trigger when swapping item into offhand from GUI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.2, 22w18a, 1.20.1, 1.20.4
    • None
    • Confirmed
    • Inventory
    • Normal
    • Platform

      Bug:

      Recipes and advancements using the "inventory_changed" trigger do not activate when a player swaps an item into their offhand from inside a chest or other GUI.

      Steps to Reproduce:

      • Place a chest with an Oak Log inside.
      • Clear all recipes and advancements:
        • /advancement revoke @s everything
          /recipe take @s *
      • Open the chest and swap the Oak Log into your offhand.

      Expected Behavior:

      You unlock new recipes for collecting the Oak Log immediately.

      Observed Behavior:

      You do not unlock the recipes until you close the chest or swap the item into a different slot.

            Unassigned Unassigned
            Kutemota Kutemota
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: