BDS query.get_equipped_item_name always returns null/empty string
This code works fine in Windows 10 single-player:
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.appletest": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640"
}
]
},
"eating": {
"on_entry": [
"/say i've eaten an apple!"
],
"transitions": [
{
"default": "!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'"
}
]
}
}
}
}
}
The exact same code is completely broken in BDS 1.16.20.03. Any custom items that require the get_equipped_item_name query no longer work due to it always returning a blank string.
I also tried the most basic test in a custom animation controller:
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.appletest": {
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'"
}
]
},
"eating": {
"on_entry": [
"/say i've eaten an apple!"
],
"transitions": [
{
"default": "!query.is_using_item"
}
]
}
}
}
}
}
This doesn't work either. query.is_using_item is working only by itself. As soon as I add query.get_equipped_item_name, it breaks because of the empty string.
Linked Issues
Comments6
History6
Changed description:
This code works fine in Windows 10 single-player:
00
0
0{0 "format_version": "1.10.0",0 "animation_controllers": {0 "controller.animation.appletest": {0 "initial_state": "default",0 "states": {0 "default": {0 "transitions": [0 {0 "eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640"0 }0 ]0 },0 "eating": {0 "on_entry": [0 "/say i've eaten an apple!"0 ],0 "transitions": [0 {0 "default": "!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'"0 }0 ]0 }0 }0 }0 }0}0000
0
The code is completely broken in BDS 1.16.20.03. Any custom items that require the get_equipped_item_name query
0
I also tried the most basic test in a custom animation controller:
00
0{0 "format_version": "1.10.0",0 "animation_controllers": {0 "controller.animation.appletest": {0 "initial_state": "default",0 "states": {0 "default": {0 "transitions": [0 {0 "eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'"0 }0 ]0 },0 "eating": {0 "on_entry": [0 "/say i've eaten an apple!"0 ],0 "transitions": [0 {0 "default": "!query.is_using_item"0 }0 ]0 }0 }0 }0 }0}00This doesn't work either. query.is_using_item is working only by itself. As soon as I add query.get_equipped_item_name, it
This code works fine in Windows 10 single-player:
000
0{0 "format_version": "1.10.0",0 "animation_controllers": {0 "controller.animation.appletest": {0 "initial_state": "default",0 "states": {0 "default": {0 "transitions": [0 {0 "eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640"0 }0 ]0 },0 "eating": {0 "on_entry": [0 "/say i've eaten an apple!"0 ],0 "transitions": [0 {0 "default": "!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'"0 }0 ]0 }0 }0 }0 }0}0000
The
0
I also tried the most basic test in a custom animation controller:
00
0{0 "format_version": "1.10.0",0 "animation_controllers": {0 "controller.animation.appletest": {0 "initial_state": "default",0 "states": {0 "default": {0 "transitions": [0 {0 "eating": "query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'"0 }0 ]0 },0 "eating": {0 "on_entry": [0 "/say i've eaten an apple!"0 ],0 "transitions": [0 {0 "default": "!query.is_using_item"0 }0 ]0 }0 }0 }0 }0}00This doesn't work either. query.is_using_item is working only by itself. As soon as I add query.get_equipped_item_name, it
Confirmation Status: Unconfirmed → Community Consensus
Added relates to link: BDS-7012animation_controller files in behavior pack cannot load properly in BDSFixed
Resolution: Unresolved → Cannot Reproduce
I've been trying to run an event using this query, and found out it never works! it's one of the most used queries, so it hopefully will get a fix soon.
happens in 1.16.40
should be part of BDS bug report type though
I should also note that this bug occurs for vanilla items and custom ones. Yes, the custom items have been defined in the Lang file.
Has this bug been fixed in the current beta? Many changes to how the game handles names have been tweaked, but it is not clear whether this has or has had an affect on the BDS for the would-be 1.16.100 update (since we are not able to test it).
This has been fixed in 1.16.100.
However, this is beginning to get comical. Now any entity spawned from anything that shoots no longer moves. It just spawns and hovers with no velocity, both in single player and on BDS. I'll open yet another new bug report.