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

Dylan

Confirmed in 16w50a

Porama

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

fmease

@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?

Dylan

Confirmed in 1.11.2

Jiří Miko

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."

pokechu22

Let me preface this by saying that I like this quirk, and don't want it to be removed either.

But that said, quirks like this are hard to keep - they're (by definition) generated by situations that the developers didn't expect would happen. And as such, it's possible for them to accidently be removed or changed without realizing it. (This specific case, that's unlikely, but for similar properties, it's another story). And not only that, you do have to worry about places where it causes errors - for instance, it is feasible for a similar issue with another type of structure to cause the world to not stop generating, as one structure generates, and then another, repeatedly. (That, also, is unlikely, but possible).

So knowing why it happens and how it works is very important. That doesn't mean it needs to be fixed, but it still needs to be investigated and checked for related issues.

Ktoś Ktosiowski

Confirmed for 18w09a

Ettanin

You can get similar seeds that produce the same effect by adding or subtracting a factor of 281474976710656 to the number (as in calculation, not in concatenation).
Sample seeds that produce the same effect:
-174436595872572
388513357548740

-117163709839622
445786243581690

There are in total 131,072 seeds (65,536 for each axis) that are affected.

muzikbike

Affects 18w16a. Not that I want this fixed.

Hayden Wong

There is actually 274,877,906,944 broken seeds.
https://youtu.be/l8_1O4dO3Bg

Hayden Wong

Affects 1.13.1

muzikbike

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

Alec Parungao

@Connor Steppie

Noooooo, they are still here.

Lolothepro29

Cannot be reproduced in Bedrock version

cjcxy

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