There are entities like Villagers or Minecarts With Chest with the minecraft:inventory component, but the Molang query.is_item_name_any('slot.inventory', 0, 'item:name') only works with players [minecraft:player] and not with the rest of entities despite also having inventory.
Steps to Reproduce:
Select an entity with minecraft:inventory component such as a Villager or a Minecart With Chest, or create a custom entity and add the component to it.
In the resource bundle, use the Molang query.is_item_name_any function on animations or textures, for example:
"animate": [
{"animation": "query.is_item_name_any('slot.inventory', 0, 'minecraft:stone')"}
]In game, put the stone in the first slot of the entity's inventory, you can put it directly or use the command:
/replaceitem @e slot.inventory 0 stone
Observed Results:
Animation never takes place => query.is_item_name_any('slot.inventory', 0, 'minecraft:stone') is not working.
Expected Results:
The animation is played when stone is placed in the first slot of an entity's inventory => query.is_item_name_any('slot.inventory', 0, 'minecraft:stone') is true when there is stone in the first slot and false when is not.
Notes:
If you do the same with a player the query works, it does not work with the other entities that have inventory.
Documentation:
⚠️ Please do not mark Unreleased Versions as affected. You don't have access to them yet.
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit