mojira.dev
MC-273770

The "minecraft:inventory_changed" advancement trigger triggers once or multiple times when opening the inventories of non-player entities

The Bug:

The "minecraft:inventory_changed" advancement trigger triggers once or multiple times when opening the inventories of non-player entities.

Steps to Reproduce:

  1. Install the attached data pack.

[media]
  1. Place an item in your inventory from the creative inventory and notice how the "minecraft:inventory_changed" advancement trigger is correctly triggered.

  2. Summon a camel and while shifting, right-click the camel to open its inventory.

  3. 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

Viradex

Can confirm. It always only does it once for me, however.

[media]
endsky

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.

Gullyman4

Relates to MC-101084 and MC-252228.

Avoma

(Unassigned)

Community Consensus

Platform

Normal

Advancements, Data Packs

1.21, 1.21.1, 24w38a

Retrieved