toolbox4minecraft / amidst

Advanced Minecraft Interface and Data/Structure Tracking
GNU General Public License v3.0
2.15k stars 240 forks source link

Seed 0 don't work #805

Closed rafbat2591 closed 4 years ago

rafbat2591 commented 4 years ago

By typing the number 0 or the related alphanumeric codes, a different seed appears

JuniorJedi490 commented 4 years ago

I suspect that this is intended behavior as entering the seed '0' in Minecraft generates a random seed. However, in Minecraft you can still get a world with a seed of 0 by using a text seed, so if text seeds that would produce a seed of 0 are producing a random seed as well, there might be a bug involved.

rafbat2591 commented 4 years ago

so if I now wanted to see seed 0 as shown here in version 4.5 of amidst, can't I see it in any way? screenshot_default_0

rafbat2591 commented 4 years ago

ps: until 1.15.2 if I entered these -tainsntoh -f5a5a608 -af4e962cd it gave me the seed above

ghost commented 4 years ago

Verified using a 1.12.2 profile 0 (zero) produces the 0 (zero) biome map, bypassing the standard Minecraft action of creating a random world when Seed is either blank or zero. This is also true for 1.13.2, and 1.14.2. Only 1.16.1 doesn't perform as expected.

I've know of several text strings that Java's hashcode() would turn into 0 (zero) and bypass the Minecraft call to random. I wasn't aware of "tainsntoh", "f5a5a608", "af4e962cd".
The text strings that I know hash to zero and are short enough to be entered as a seed are: pollinating sandboxes amusement & hemophilias schoolworks = perversive electrolysissweeteners.net constitutionalunstableness.net grinnerslaphappier.org BLEACHINGFEMININELY.NET WWW.BUMRACEGOERS.ORG WWW.RACCOONPRUDENTIALS.NET bequirtle zorillo chronogrammic schtoff contusive cloisterlike creashaks organzine drumwood boulderhead electroanalytic exercisable favosely nonconstruable

For some reason Amidst code isn't bypassing the zero equals random code for a 1.16.1 profile. Also entering a text seed that WILL produce the zero seed world in 1.16.1 produces a random world map in Amidst.

Amidst, except for using a 1.16.1 profile, has ALWAYS produced the map for the zero seed world.

Strangely entering "pollinating sandboxes" as a seed to create a 1.16.1 world WILL produce the ZERO seed world. 1 16 2 zero seed

ghost commented 4 years ago

I did some more testing.
As I stated, I did create the Zero seed world in MC 1.16.1 and got the correct world. In fact, entering /seed while in game will produce a response of Seed: [0].

HOWEVER. Telling Amidst 4.5 Beta3 to Open Save Game and point it at that Zero Seed world folder will cause Amidst to produce a random world map EVEN THOUGH IT DISPLAYS THE SEED AS 0. And each time the world file is opened a different world map is displayed.

Below is the Minutor display of the Spawn area for the 1.16.1 Zero seed world and the Amidst 4.5 beta3 map of the same seed with a 1.15.2 profile.

Zero world Minutor screenshot_default_0 1151

moulins commented 4 years ago

Minecraft 1.16 uses a new MinecraftInterface, with a new way of creating the world which doesn't bypass the special case for the 0 seed.

To fix this, I've modified the code to set the seed as a string which will hash to zero.