mojira.dev
MC-111378

Math error (random generation of zero) causing map gen to fail

There is a math error in MapGenBase.java (MCP Name) in the generate function.

When the per chunk seeds are being generated there is a very small chance that either the x or z can be equal to 0.

When doing the per chunk math it multiplies by 0 causing every chunk in the axis to be the same.

The following seeds are affected:

107038380838084
164311266871034

There needs to be a check so that if those values are 0, then it should be set to 1.

I have recorded a video demonstrating this, including a fix:
https://www.youtube.com/watch?v=D5c-DZA2R2U&feature=youtu.be

Linked issues

Attachments

Comments 15

Confirmed in 16w50a

So there is only 2 seed , why not just +1 to those seed?

@Paroma Don't try to annihilate the effects but the cause/root of a problem, otherwise you would just create side effects. And we don't want more unecessary bugs on the tracker, right?

Confirmed in 1.11.2

Please don't ruin this "feature". It is known about more then 1 year. This was originaly posted by Azelef on this video https://youtu.be/fnwAdUTlEvI . In this video https://youtu.be/RssvOCRdDJM is his explanation...
btw he wrote in description of original video this:::
"If this is ever reported as a bug, I think that it should be closed as "working as intended", because it's cool and doesn't cause any problems."

5 more comments

Affects 1.13.1

This may be fixed in 21w41a - am yet to check.

@Connor Steppie

Noooooo, they are still here.

Cannot be reproduced in Bedrock version

I try it  again in 1.18(made in 2021.11.30,The latest version of Minecraft ),it still Affects

 

Erik Martin

(Unassigned)

Confirmed

World generation

map-generation-error, random, seed, world-generation

Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12 Pre-Release 5, ..., 1.16 Release Candidate 1, 1.16, 20w27a, 20w29a, 1.16.2

Retrieved