{
   "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
   "id": "367532",
   "self": "https://bugs.mojang.com/rest/api/2/issue/367532",
   "key": "BDS-9536",
   "fields": {
      "issuetype": "1",
      "project": "11700",
      "fixVersions": [],
      "resolution": "5",
      "customfield_10500": {
         "self": "https://bugs.mojang.com/rest/api/2/customFieldOption/10302",
         "value": "Community Consensus",
         "id": "10302",
         "disabled": false
      },
      "customfield_12800": null,
      "customfield_12602": [],
      "customfield_12601": null,
      "customfield_12604": null,
      "customfield_12603": null,
      "customfield_12606": null,
      "customfield_12605": null,
      "customfield_12608": null,
      "resolutiondate": "2021-02-25T12:54:25.000+0200",
      "customfield_12607": null,
      "customfield_12609": null,
      "workratio": -1,
      "lastViewed": null,
      "watches": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-9536/watchers",
         "watchCount": 4,
         "isWatching": false
      },
      "created": "2020-08-24T05:32:22.000+0300",
      "customfield_12000": null,
      "customfield_12201": null,
      "customfield_12600": null,
      "labels": [],
      "customfield_11700": "{}",
      "versions": [
         "19608"
      ],
      "issuelinks": [
         {
            "id": "209254",
            "self": "https://bugs.mojang.com/rest/api/2/issueLink/209254",
            "type": "10103",
            "outwardIssue": "350525"
         }
      ],
      "assignee": null,
      "updated": "2021-02-25T12:54:25.000+0200",
      "status": "5",
      "description": "This code works fine in Windows 10 single-player:\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n{code}\r\n\u00a0\r\n\r\nThe 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.\r\n\r\n\u00a0\r\n\r\nI also tried the most basic test in a custom animation controller:\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n{code}\r\nThis 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.",
      "customfield_11100": null,
      "customfield_11300": "Ubuntu",
      "customfield_11500": "427512",
      "customfield_12503": null,
      "customfield_12700": null,
      "customfield_12502": null,
      "customfield_12504": null,
      "attachment": [],
      "summary": "BDS query.get_equipped_item_name always returns null/empty string",
      "creator": "zizzyzizzy",
      "reporter": "zizzyzizzy",
      "customfield_10002": null,
      "customfield_12501": null,
      "customfield_12500": null,
      "customfield_11601": null,
      "customfield_11600": "0|i1l4u7:",
      "environment": null,
      "customfield_11801": null,
      "customfield_11800": null,
      "customfield_11602": null,
      "customfield_11802": null,
      "comment": {
         "comments": [
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/795244",
               "id": "795244",
               "author": "JIRAUSER494806",
               "body": "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.",
               "updateAuthor": "JIRAUSER494806",
               "created": "2020-08-24T17:31:55.157+0300",
               "updated": "2020-08-24T17:31:55.157+0300"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/821687",
               "id": "821687",
               "author": "JIRAUSER556245",
               "body": "happens in 1.16.40",
               "updateAuthor": "JIRAUSER556245",
               "created": "2020-10-06T15:31:00.415+0300",
               "updated": "2020-10-06T15:31:00.415+0300"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/821688",
               "id": "821688",
               "author": "JIRAUSER556245",
               "body": "should be part of BDS bug report type though",
               "updateAuthor": "JIRAUSER556245",
               "created": "2020-10-06T15:31:43.743+0300",
               "updated": "2020-10-06T15:31:43.743+0300"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/832704",
               "id": "832704",
               "author": "JIRAUSER556245",
               "body": "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.",
               "updateAuthor": "JIRAUSER556245",
               "created": "2020-10-31T22:36:28.674+0200",
               "updated": "2020-10-31T22:36:28.674+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/841496",
               "id": "841496",
               "author": "JIRAUSER420943",
               "body": "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).",
               "updateAuthor": "JIRAUSER420943",
               "created": "2020-11-15T23:14:01.339+0200",
               "updated": "2020-11-15T23:14:01.339+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/367532/comment/842788",
               "id": "842788",
               "author": "zizzyzizzy",
               "body": "This has been fixed in 1.16.100.\r\n\r\nHowever, 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.",
               "updateAuthor": "zizzyzizzy",
               "created": "2020-11-18T01:48:01.440+0200",
               "updated": "2020-11-18T01:48:51.471+0200"
            }
         ],
         "maxResults": 6,
         "total": 6,
         "startAt": 0
      },
      "votes": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-9536/votes",
         "votes": 5,
         "hasVoted": false
      }
   },
   "changelog": {
      "startAt": 0,
      "maxResults": 6,
      "total": 6,
      "histories": [
         {
            "id": "1784674",
            "author": "zizzyzizzy",
            "created": "2020-08-24T05:34:58.516+0300",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "This code works fine in Windows 10 single-player:\r\n\r\n\u00a0\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n{code}\r\n\u00a0\r\n\r\n\u00a0\r\n\r\nThe 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.\r\n\r\n\u00a0\r\n\r\nI also tried the most basic test in a custom animation controller:\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n{code}\r\nThis 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.",
                  "to": null,
                  "toString": "This code works fine in Windows 10 single-player:\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple' && query.item_in_use_duration >= 640\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item || query.item_in_use_duration < 640 || query.get_equipped_item_name('main_hand') != 'apple'\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n{code}\r\n\u00a0\r\n\r\nThe 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.\r\n\r\n\u00a0\r\n\r\nI also tried the most basic test in a custom animation controller:\r\n\r\n\u00a0\r\n{code:java}\r\n{\r\n  \"format_version\": \"1.10.0\",\r\n  \"animation_controllers\": {\r\n    \"controller.animation.appletest\": {\r\n      \"initial_state\": \"default\",\r\n      \"states\": {\r\n        \"default\": {\r\n          \"transitions\": [\r\n            {\r\n              \"eating\": \"query.is_using_item && query.get_equipped_item_name('main_hand') == 'apple'\"\r\n            }\r\n          ]\r\n        },\r\n        \"eating\": {\r\n          \"on_entry\": [\r\n            \"/say i've eaten an apple!\"\r\n          ],\r\n          \"transitions\": [\r\n            {\r\n              \"default\": \"!query.is_using_item\"\r\n            }\r\n          ]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n{code}\r\nThis 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."
               }
            ]
         },
         {
            "id": "1849529",
            "author": "umija5895",
            "created": "2020-10-25T05:13:27.784+0200",
            "items": [
               {
                  "field": "Key",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "MCPE-97765",
                  "to": null,
                  "toString": "BDS-9536"
               },
               {
                  "field": "Platform",
                  "fieldtype": "custom",
                  "from": "11503",
                  "fromString": "Multiple",
                  "to": null,
                  "toString": ""
               },
               {
                  "field": "Version",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "19608",
                  "toString": "1.16.40"
               },
               {
                  "field": "Version",
                  "fieldtype": "jira",
                  "from": "19583",
                  "fromString": "1.16.20",
                  "to": null,
                  "toString": null
               },
               {
                  "field": "Workflow",
                  "fieldtype": "jira",
                  "from": "528497",
                  "fromString": "MCPE Workflow",
                  "to": "541642",
                  "toString": "Global Mojang Workflow"
               },
               {
                  "field": "project",
                  "fieldtype": "jira",
                  "from": "10200",
                  "fromString": "Minecraft (Bedrock codebase)",
                  "to": "11700",
                  "toString": "Bedrock Dedicated Server"
               }
            ]
         },
         {
            "id": "1849530",
            "author": "umija5895",
            "created": "2020-10-25T05:13:44.743+0200",
            "items": [
               {
                  "field": "Confirmation Status",
                  "fieldtype": "custom",
                  "from": "10300",
                  "fromString": "Unconfirmed",
                  "to": "10302",
                  "toString": "Community Consensus"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "1856949",
            "author": "mega_spud",
            "created": "2020-10-30T15:51:37.025+0200",
            "items": [
               {
                  "field": "ADO",
                  "fieldtype": "custom",
                  "from": null,
                  "fromString": null,
                  "to": null,
                  "toString": "427512"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "1881668",
            "author": "umija5895",
            "created": "2020-11-16T05:07:26.338+0200",
            "items": [
               {
                  "field": "Link",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "BDS-7012",
                  "toString": "This issue relates to BDS-7012"
               }
            ]
         },
         {
            "id": "2045978",
            "author": "urielsalis",
            "created": "2021-02-25T12:54:25.358+0200",
            "items": [
               {
                  "field": "resolution",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "5",
                  "toString": "Cannot Reproduce"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "5",
                  "toString": "Resolved"
               }
            ]
         }
      ]
   }
}