The bug
The molang query.get_equipped_item_name
conflates items in separate namespaces that happen to have the same name. The entire point of namespaces is to allow different items to share a name but still be distinguishable, but this query makes that impossible.
How to reproduce
1. Download the attached world
2. Select the vanilla apple
3. Deselect it
4. Select the custom apple (which looks like a heart of the sea)
Observed results
Both cause "UNKNOWN APPLE" to be printed to chat
Expected results
The vanilla apple should cause "VANILLA APPLE" to be printed; the custom apple should cause "CUSTOM APPLE" to be printed. Here is the animation controller file:
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.apple": {
"states": {
"default": {
"transitions": [
{
"vanilla_apple": "query.get_equipped_item_name=='minecraft:apple'"
},
{
"custom_apple": "query.get_equipped_item_name=='custom:apple'"
},
{
"unknown_apple": "query.get_equipped_item_name=='apple'"
}
]
},
"vanilla_apple": {
"on_entry": ["/say VANILLA APPLE"],
"transitions": [
{
"default": "query.get_equipped_item_name!='minecraft:apple'"
}
]
},
"custom_apple": {
"on_entry": ["/say CUSTOM APPLE"],
"transitions": [
{
"default": "query.get_equipped_item_name!='custom:apple'"
}
]
},
"unknown_apple": {
"on_entry": ["/say UNKNOWN APPLE"],
"transitions": [
{
"default": "query.get_equipped_item_name!='apple'"
}
]
}
}
}
}
}
query.get_equipped_item_name is deprived. Use query.is_item_name_any instead. The new animation controller should look like this: