mojira.dev
MC-299634

The /item command does not trigger the "minecraft:inventory_changed" advancement trigger on the body and saddle slots

On armor.body slot and saddleslots, when /item modify or /item replace commands are run, it does not cause the minecraft:inventory_changed to be triggered.

Steps to reproduce:

  1. Create the world with bug_report datapack activated(It is provided in the files section of this post.)

  2. Run this command to see the advancement is working:
    The result should be “My Inventory Changed” text be displayed on the chat.

    /item replace entity @s weapon.mainhand with minecraft:diamond_horse_armor
  3. Run this command to see if the modifier is working:
    The result should be “My Inventory Changed” text be displayed on the chat

    /item modify entity @s weapon.mainhand bug_report:modifier_set_name
  4. Run this command to see the bug with /item replace
    The result should be, the command executing with success but “My Inventory Changed” text not being put in in chat, which shows the minecraft:inventory_changed did not trigger.

    /item replace entity @s armor.body with minecraft:diamond_horse_armor
  5. Run this command to see the bug with /item modify
    The result should be, the command executing with success but “My Inventory Changed” text not being put in in chat, which shows the minecraft:inventory_changed did not trigger.

    /item modify entity @s armor.body bug_report:modifier_set_name
  6. Repeat the steps 4 and 5 with the command being modified to replace armor.body with minecraft:diamond_horse_armor with saddle with minecraft:saddle on the step 4, and armor.body with saddle on the step 5 to see the saddle slot being broken, the outputs should be the same.

These are the steps to reproduce the bug.

Environment

A newly created Vanilla 1.21.7 Minecraft World, with bug_report datapack I have created(In the files), which only has an advancement, a function and 2 item modifiers, to visualize and test the bug.

Linked issues

Attachments

Comments 2

Video recreation of it:

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

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

Efimity

(Unassigned)

Confirmed

(Unassigned)

1.21.7, 25w41a

Retrieved