Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-269790

Unhelpful error messages in inlined /item modify

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 24w12a
    • None
    • Confirmed
    • Commands
    • Normal
    • Platform

      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.

       

            Unassigned Unassigned
            tryashtar [Mod] tryashtar
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: