mojira.dev
MC-183786

Named seeds that are not numbers are not being recognized

To Reproduce

  1. Create a world with seed a in 20w20a.

  2. Check the seed by using /seed command.

    • Expected: 97

    • ❌ Actual: a random number

Original Description

In the latest snapshot I tried using a world generated with the seed "a", which should be seed "97".

However in this snapshot the seed I received was much longer, and resembled a seed that would generate randomly. I tried the same "a" seed again, and I received a different seed yet again. I tried this with other words and they all give back random seeds. When I tried the seed "1" the world generated with the seed "1", which leads me to believe this is only the case for seeds made up of letters.

Linked issues

Comments 4

robbage

Me as well using a phrase as a seed.

Lee Wright

Tried using my favorite seed name, named after a streamer I watch, abd it just generates a random world each time I recreated the world, ignoring what I typed.

Lee Wright

20w20b still has this bug.

Alan McClure

It's obvious that 20w20 code is not calling hashcode() when given a non-numeric seed.
Hashcode() produces a 32 bit signed integer to be used as the world seed.
32 bit signed integers range from -2,147,483,648 thru 2,147,483,647.

The PRNG used in Java produces a 64 bit signed integer.
These random seeds tend to be 17 to 19 digits in length.

agentpaint

Fry

Confirmed

Important

World generation

world

20w20a, 20w20b

20w21a

Retrieved