Mojira Archive
MC-279951

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

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.

Duplicate

Pencil Sharpener

2025-01-29, 09:57 PM

2025-01-29, 10:35 PM

2025-01-29, 10:11 PM

0

0

Unconfirmed

(Unassigned)

25w05a

-