Affects Version/s: Minecraft 1.9
Fix Version/s: None
When playing around with creating default worlds with different seeds, I found a weird quirk in the seed calculation algorithm. From what I can tell, it works like so:
If the seed string can be parsed into a long, it uses that long as the seed.
Otherwise, it uses the hash code of the seed string.
So far, this isn't weird. The weird part is determining whether or not to generate the seed randomly.
As we all know, leaving the seed string blank generates the seed randomly. However, entering a seed of 0 also generates the seed randomly. This is unexpected, but it makes sense; the hash code of the empty string is zero. The really weird bit happens when entering a non-empty string with a hash code of zero, for example, the string f5a5a608. One would expect that it generates the seed randomly. However it actually proceeds to generate a world with a seed of 0.
This is an inconsistency in the seed calculation algorithm and there seems to be no purpose for it. Either the seed of 0 shouldn't be generating the seed randomly, or nonempty strings with a hash code of 0 should be generating the seed randomly.