The Bug:
The "minecraft:inventory_changed" advancement trigger triggers once or multiple times when opening the inventories of non-player entities.
Steps to Reproduce:
Install the attached data pack.
Place an item in your inventory from the creative inventory and notice how the "minecraft:inventory_changed" advancement trigger is correctly triggered.
Summon a camel and while shifting, right-click the camel to open its inventory.
Observe if or how many times the "minecraft:inventory_changed" advancement trigger was triggered.
Observed Behavior:
The "minecraft:inventory_changed" advancement trigger triggers once or multiple times when opening the inventories of non-player entities.
Expected Behavior:
The "minecraft:inventory_changed" advancement trigger would not trigger at all when opening the inventories of non-player entities as no changes have been made to your player's inventory.
Attachments
Comments 3


Can confirm. The number of times that triggers is actually equal to the number of item stack in your inventory (not including offhand slot and armor slots). And this also happens when opening block GUI, not exclusive to non-player entities.
Can confirm. It always only does it once for me, however.
[media]