A world with seed 0 cannot be copied using the "Re-Create" option
The bug
When you have a world with seed zero, i.e. when
/seed
outputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
How to reproduce
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended: MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are some options for the text, that will generate a world with seed 0:
tainsntoh f5a5a608 af4e962cd
Created Issue:
A world with seed 0 cannot copied using the "Re-Create" option
When you have a world with seed zero, i.e. when
/seedoutputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
To reproduce:
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended:MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are some texts for the seed option, that will gernerate a world with seed 0:tainsntoh f5a5a608 af4e962cdEnvironment
All.
Linux 3.19.0-39-generic (Ubuntu 15.04, 64 bit)
Oracle Java 1.8.0_66 (64 bit)
When you have a world with seed zero, i.e. when
/seedoutputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
To reproduce:
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended:MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are sometexts for theseed option, that will gernerate a world with seed 0:tainsntoh f5a5a608 af4e962cdWhen you have a world with seed zero, i.e. when
/seedoutputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
To reproduce:
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended:MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are some options for the text, that will gernerate a world with seed 0:tainsntoh f5a5a608 af4e962cd
A world with seed 0 cannot be copied using the "Re-Create" option
relates to
relates to
All.
Linux 3.19.0-39-generic (Ubuntu 15.04, 64 bit)
Oracle Java 1.8.0_66 (64 bit)
Linux 3.19.0-39-generic (Ubuntu 15.04, 64 bit)
Oracle Java 1.8.0_66 (64 bit)
When you have a world with seed zero, i.e. when
/seedoutputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
To reproduce:
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended:MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are some options for the text, that will gernerate a world with seed 0:tainsntoh f5a5a608 af4e962cdThe bug
When you have a world with seed zero, i.e. when
/seedoutputs 0, then it cannot be recreated using the "Re-Create" option, because it will be interpreted as a random seed. To be clear, I know that putting "0" in the seed option is supposed to create a random world. However, I would expect that copying an existing world with seed 0 would also generate a world with seed 0.
How to reproduce
As mentioned, putting '0' in the seed option on the "Create New World" screen will be interpreted as a random seed (Personally I find this unintuitive behavior, but this has been resolved as intended:
MC-1820). However, a world with the seed 0 can be generated either through external tools, or by choosing the seed text very carefully. Here are some options for the text, that will generate a world with seed 0:tainsntoh f5a5a608 af4e962cd
Confirmed for
- 15w49b
Grum, that is not correct it should rather be "Limitation of how we made seeds to work"
In /Client/src/net/minecraft/client/gui/GuiCreateWorld.java (MCP 1.8 name) you can clearly see that the reason for this is if (var5 != 0L) and there is very likely no reason for that, instead it creates other bugs like MC-94025
long var2 = (new Random()).nextLong(); String var4 = this.field_146335_h.getText(); if (!StringUtils.isEmpty(var4)) { try { long var5 = Long.parseLong(var4); if (var5 != 0L) { var2 = var5; } } catch (NumberFormatException var7) { var2 = (long)var4.hashCode(); } }
You are right, I am sorry
Based on MC-94025 I assumed that there is no problem.
Are you sure that somewhere the next(int bits) method is called with the seed as bits? I only see the seed being used as seed for the random generators.
MC-94025 has been reopened to deal with the consequences of strings that hash to 0 such as "tainsntoh".
From the comments there:
We've now defined '0' as special. It will indicate a random seed. Many games use 0 as 'random' or 'infinite' or 'do not care' flag when providing options.
You may be interested in MC-94025.
Can you please create a "relates to" link to MC-94025
This is related to MC-94025.
Confirmed for
MC-1820rather as a bug. If the user wants a random seed he should leave the text field empty[Mojang] Grum (Erik Broes) resolved
MC-44944- "0" is not handled as a valid seed as 'Works As Intended'Limitation of how seeds work, setting it to 0 doesn't work so nicely
I agree. The seed text should be left empty for a random seed. If I specify that I want my seed to be '0' then it should be zero. I found it a little irritating that I couldn't even copy the world once I actually had one with seed zero.
this works as intended as of
MC-44944The would probably need to be changed to test if the parsed long or the hash code is 0. This would not fix the problem for already existing worlds with the seed 0.
Note: If this is really the planned fix, a message in the world creation GUI should indicate that 0 or Strings that have 0 as hash code result in a random seed.
This whole situation shows that defining 0 as special is problematic.
Yes. However at this point you may as well ignore the if statement, or check for !=null only.
Can confirm for MC 1.12.1.
Confirmed for 18w30b
Confirmed for 18w31a
Confirmed for 18w32a
Confirmed for 18w33a
Confirmed for 1.13.1-pre1
affects 20w21a
Affects 1.16.5 and 20w51a.
Can confirm in 1.17.1.
Does 22w03a resolve this issue?
22w03a does, in fact, seem to resolve this
Can confirm fixed in 22w03a.