The bug
When /execute store
is used to store the result of the /seed
command, the wrong value gets stored. Here are some values I found:
If the seed is 225704178974273007, the stored value is 1142238703.
If the seed is -8136237196898536299, the stored value is -2037713771
If the seed is -6529837547381228143, the stored value is -480936559
How to reproduce
Create a new world, or load an existing world
Type
/seed
to obtain the world seed.Create a scoreboard objective to store the seed in.
/scoreboard objectives add seed dummy
/scoreboard objectives setdisplay sidebar seed
Run the following command to store the world seed in the scoreboard data:
/execute store result score @s seed run seed
Note that the stored value is different from the actual seed.
Give yourself an item with a custom NBT tag.
/give @s minecraft:stone{seed:1}
Drop the item on the ground.
Run the following command to store the world seed in the item data:
/execute store result entity @e[type=item,limit=1] Item.tag.seed int 1 run seed
Get the entity data and note that the stored value different is from the world seed, but the same as the one stored in the scoreboard objective.
/data get entity @e[type=item,limit=1]
This is unlikely to be fixed, as scoreboard values are integers while seeds are longs. To fix this, scoreboard values would need to be changed to allow bigger values. Leaving open though and letting a developer decide.