mojira.dev
MC-274037

The "minecraft:inventory_changed" advancement trigger do not trigger while swapping items between offhand and any container slots

The Bug:

When any container GUI is opened, swapping an item stack into/out of the container using the "Swap Item With Off Hand" key (default "F") does not trigger the "minecraft:inventory_changed" advancement trigger.

Steps to Reproduce:

  1. Install the attached datapack.

[media]
  1. Place an item in your offhand slot.

  2. Place down a chest or a minecart with chest and open it (advancement triggers when opening the GUI due to behaviors related to MC-273770).

  3. Move the cursor to any slot of the chest and press the "Swap Item With Off Hand" key.

  4. Observe if the advancement triggered or not while pressing the key.

Observed Behavior:

The "minecraft:inventory_changed" advancement trigger does not trigger when using the "Swap Item With Off Hand" key to swap item into/out of container.

Expected Behavior:

The "minecraft:inventory_changed" advancement trigger would trigger when using the "Swap Item With Off Hand" key to swap item into/out of container.

Linked issues

Attachments

Comments 2

Thank you for your report!
We're tracking this issue in MC-251555, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

endsky

(Unassigned)

Community Consensus

Data Packs

1.21

Retrieved