-
Bug
-
Resolution: Fixed
-
Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2
-
Confirmed
The bug
The Mesa (Bryce) biome generates with the seed of the last world which generated a Mesa (Bryce) biome or 0 (default long value) if this biome was not generated in a world before.
This can result in worlds with the same seeds but different terrain, see First generation (17w06a).png and Second generation (17w06a).png.
How to reproduce
Last updated for 17w06a
- Start Minecraft (to make sure the cached world seed has the value 0)
- Create a new default world with the following seed
-1170477772675655972
- Teleport to the following coordinates
/tp 14515 120 7087 -160 48
- Take a screenshot to be able to compare the biomes later
- Create a new default world with the following seed
-8590338427130770590
- Teleport to the following coordinates
/tp -572 120 3663
- Delete the world as you don't need it anymore
- Repeat steps 2 to 4 (both inclusive) and compare the screenshots
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
Each biome is only instantiated once but has fields to cache some values. BiomeMesa has the field worldSeed to store the seed of the world it is currently generating terrain for. This makes it possible to not constantly create new objects of classes which need this seed, but instead only do this if the worldSeed value and the seed of the current world differ.
The problem is that the method net.minecraft.world.biome.BiomeMesa.genTerrainBlocks(World, Random, ChunkPrimer, int, int, double) creates a new Random object with the worldSeed value which is at that point not set to the correct world seed instead of using the seed of the current world.
- testing discovered
-
MC-125101 Mesa (Bryce) generation cuts off at chunk borders
- Resolved