mojira.dev
MC-265799

Store lock data result is the digit count not the the complete integer.

Block Lock data:
25259067

Command used:
/execute store result score b k_knl run data get block ^ ^1 ^ Lock

result inside scoreboards & storage:
8

expected result:
25259067

Note:
Even the output of the of the command is outputting the right number, the scoreboard and the storage is saving the wrong result. It saving the digit length of the number not the number itself. (see pic.)

Recreate with these commands:

  • /scoreboard objectives add test dummy

  • /scoreboard objectives setdisplay sidebar test

  • (place a chest in front of the player and look at it)

  • /data merge block ^ ^1 ^ {Lock:"123"}

  • /execute store result score test test run data get block ^ ^1 ^ Lock

Attachments

Comments 2

Lock is a string, result of string is character count, that's universal.
This is a change request and not a bug (requesting strings that contain a valid number to return the number instead of the normal string length.

Get result:

  • string: length

  • list/array: entry count

  • compound: field count

  • byte/short/int/long: value cast to int

Ok, thanks for the information.
I couldn't find that info on the wiki or maybe I haven't read enough. 😃👍

Kathezel

(Unassigned)

Unconfirmed

(Unassigned)

1.20.2

Retrieved