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

All successful /data commands modifying pre-existing storage files cause an "unexpected error" (and cancel any currently running functions)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 25w05a
    • None
    • Unconfirmed
    • (Unassigned)

      Any data command that successfully modifies a storage target under any namespace that existed at world load (i.e. 'data/command_storage_<namespace>.dat' was present) will fail with “An unexpected error occurred trying to execute that command” (mouseover: “java.lang.UnsupportedOperationException”). If the actual storage target ID (full namespace:id pair) existed when the world was loaded, the modification will still take place like normal, otherwise the storage target will not be created and the change will be lost. (Edit: data merge seems to have no effect either way, even if data modify ... merge does.) If this happens inside of a function, the entire function stack stops executing.

      Steps to reproduce:

      1. data modify storage test:a a set value 1
        • Command runs successfully.
      2. Close and reopen the world.
      3. data modify storage test:a b set value 1
        • “An unexpected error occurred trying to execute that command”
      4. data modify storage test:a b set value 1
        • Command fails as expected since b was just set to 1.
      5. data remove storage test:a b
        • “An unexpected error occurred trying to execute that command”
      6. data remove storage test:a b
        • Command fails as expected since b was just removed. (The error message doesn't make much sense, but that's unrelated.)
      7. data modify storage test:b a set value 1
        • “Unexpected error” and the test:b storage is not created, so no modification takes place.
      8. data modify storage test:b a set value 1
        • “Unexpected error” again because test:b is still empty.
      9. data modify storage test_2:a a set value 1
        • Command succeeds as normal since the test_2 namespace did not exist at world load/was not loaded from a file.

            Unassigned Unassigned
            PencilSharpener Pencil Sharpener
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: