Mojira Archive
MCPE-168449

is_sneaking filter returns 0.0 (false) when player is sneaking & has item in main_hand

To recreate: (allay runtime)

  "on_interact": {
    "filters": {
    // is a player sneaking? working 1.19.63, broken 1.19.70
      "all_of": [
        {"test":"is_family", "subject":"other", "operator":"equals", "value":"player"},
        {"test":"is_sneaking", "subject":"other", "operator":"equals", "value":true}
      ]
    },
    "event": "demo:sneak_mode",
    "target": "self" 
  },
   "swing": true,
   "interact_text": "give",
   "give":true

expected result and (pre- 1.19.70 update) result: demo:sneak_mode event fires, interactive text appears for game controllers "give"

current result: demo:sneak_mode only fires if player is empty handed. After rigorous testing today, I found out the MOLANG query.is_sneaking is returning a value of 0.0 when player is sneaking, but has item in hand. query.is_sneaking returns 1.0 ONLY if player sneaking AND main_hand is empty.

Only main_hand was checked in my testing. is_sneaking Filters in other components were not examined by me. Again, this was using an allay runtime on an entitly

Fixed

Test Pattern

2023-03-16, 09:43 AM

2023-04-26, 07:25 PM

2023-04-26, 07:25 PM

49

14

Confirmed

999130

QueryResult, molang

1.19.80.22 Preview - 1.19.731.19.80.22 Preview, 1.19.70, 1.19.71, 1.19.72, 1.19.73

1.19.80.24 Preview, 1.19.80