Mojira Archive
BDS-9536

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

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.

History6

Zizzy zizzy

Changed description:

This code works fine in Windows 10 single-player:

0

 

0

 

0
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}00
0
0

 

0

 

0

The code is completely broken in BDS 1.16.20.03. Any custom items that require the get_equipped_item_name query are now completely broken in BDS.

0

 

0

I also tried the most basic test in a custom animation controller:

0

 

0
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'"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}0
0
0

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 never works because it always returns an empty string.

This code works fine in Windows 10 single-player:

0

 

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}00
0
00

 

0

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.

0

 

0

I also tried the most basic test in a custom animation controller:

0

 

0
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'"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}0
0
0

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.

[Mod] Umija5895M

Key

Platform

project

Added affects versions: 1.16.40

Removed affects versions: 1.16.40

[Mod] Umija5895M

Confirmation Status: UnconfirmedCommunity Consensus

[Mod] Umija5895M
[Mod] Urielsalis
Cannot Reproduce
Zizzy zizzy
5
4
Community Consensus
427512
1.16.40