Mojira Archive
MC-269790

Unhelpful error messages in inlined /item modify

When using an inline item modifier in /item modify, a schema error always yields "not a list" instead of a proper error.

How to reproduce

/item modify entity @s weapon {}
/item modify entity @s weapon {function:"blah"}
/item modify entity @s weapon {function:"set_count"}

Expected result

  1. Missing key "function"
  2. Invalid function name
  3. Missing key "count"

Observed result

  1. Not a list
  2. Not a list
  3. Not a list

Notes

It also seems like these errors don't show up while typing. Although they are syntax errors, since they prevent functions from loading. Additionally, as a workaround, you can wrap the argument in a list to start getting proper schema errors for the inner element.

 

Fixed

[Mod] tryashtar

2024-03-22, 11:08 PM

2024-04-03, 09:24 PM

2024-04-03, 09:24 PM

2

2

Confirmed

Normal

Platform

Commands

24w12a

-