mojira.dev
MC-209001

Typing seed 0 no longer generates a random seed

The bug

If you put 0 in the seed box where you type the seed, the seed will always be 48 instead of a random seed. It looks like this issue has been introduced with the fix for MC-183786.

How to reproduce

  1. Create a new world

  2. Go to the "More World Options" screen

  3. Type "0" in the seed field

  4. Create the world

  5. Run /seed
    → ❌ Notice how the seed is 48 and not a random value

Notes

The 0 turning into 48 in codes of customized worlds is MC-184634.

Linked issues

Comments 12

Nickid2018

This should be because the seed text box parses "0" into a string instead of a number. Because the hash code value of the string "0" is 48.

Chungui23

I'm pretty sure this happens due to seed 0 is not a valid seed, therefore, your report is likely to be closed as invalid by a mod.

W_V

This seed used to generate a random seed. See MC-44944 for more info.

Nickid2018

Can confirmed in 20w51a and 1.16.4

Nickid2018

I can confirm that all versions after fixing MC-183786 in 20w21a parse "0" into 48, while all previous versions parse it into a random seed

2 more comments
Nickid2018

Can confirm in 21w06a

ampolive

Can confirm in 21w41a.

ampolive

Might be intended now as of 22w03a as per the changelogs:
— A seed of the number zero is no longer handled as a special case

user-f2760

This reports still needs to get resolved as either WAI (no longer special) or fixed (no longer turns into 48).

dovisutu

1.21 yields seed 0 for input 0, not 48. Might need to update the description (and perhaps status); didn't test when the change happened since the duration is long.

W_V

(Unassigned)

Confirmed

(Unassigned)

1.16.4, 20w51a, 21w03a, 1.16.5, 21w05a, ..., 21w41a, 21w42a, 1.18 Release Candidate 4, 1.18, 1.18.1

Retrieved