1.15.2, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Pre-release 8
Note to anyone creating a snapshot video: the fact that these ore veins repeat is not the bug being reported here. Refer to the screenshots below, specifically the late ones which are divided into quadrants - as you can see, the exact same ore vein ends up looking different when generated in one quadrant than when it is in another. You can see even more extreme precision loss in other screenshots, where the ore veins cluster into visible squares, which eventually happens on all worlds regardless of seed due to this bug. The only reason why the seed in question was used was to show how the exact same ore vein can differ depending on where it generates, this latter thing being the bug this ticket is referring to.
A further explanation as to why this happened, as well as other similar such bugs, can be found on the following wiki page: https://minecraft.gamepedia.com/Distance_effects_in_Java_Edition
The 1.15.2 mod used to demonstrate extreme versions of this effect can be found here (make sure to turn Far Lands generation off in the /farlands command's menu, and do not load any chunks between 67108864 and 134217728): https://www.curseforge.com/minecraft/mc-mods/farlands
Unlike most population features, the generation of mineral lodes uses 32-bit floats for block positions. This causes ore seams in the world to generate in a slightly distorted fashion within the world at high distances, which is very insignificant. However, if the world generation is extended out past 30 million blocks using a mod, this issue can escalate, even causing the world to crash if attempting to load chunks between 67108864 and 134217728 blocks, due to ore veins being positioned in adjacent chunks resulting in runaway chunk loading.
It is possible to clearly reproduce this precision loss within vanilla bounds using the following seed:
which causes ore veins to repeat diagonally (due to a different mechanic), allowing us to compare the exact same ore vein as it would be generated at different positions. (Please don't fix this, though! Focus on the ore precision loss bug.) Couple this with the superflat preset
to get a two thick layer of stone for ores to generate in. (As this functionality was removed in 20w21a, a reasonable alternative would be to just use a normal world with the /fill command to flatten and expose stone, such that the mineral vein generation becomes visible.)
After 16,777,216 blocks, a clear cutoff can be seen where the ore veins start to generate in incorrect, blockier shapes (on the 085151 screenshot, 16777216 on both axes is to the top left).
Further info can be found here: https://www.reddit.com/r/Minecraft/comments/9u9d4i/floats_minecraft_and_the_far_lands/
Emerald ore generation is unaffected by this bug.
- relates to
MC-164352 Casting issue: Snow animation becomes stretched when being very high above the ground
MC-186362 Casting issue: Translucent block rendering breaks down at high distances
MC-187664 World border uses float to determine its size, making some border sizes inaccessible, and cannot be set to 30 million or beyond
MC-192718 Casting issue: Temperature loses precision at high distances leading to incorrect snow and ice generation and incorrect snowfall