Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-113577

Mesa (Bryce) biome generates with seed of last world which generated the same biome before

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      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

      1. Start Minecraft (to make sure the cached world seed has the value 0)
      2. Create a new default world with the following seed
        -1170477772675655972
        
      3. Teleport to the following coordinates
        /tp 14515 120 7087 -160 48
        
      4. Take a screenshot to be able to compare the biomes later
      5. Create a new default world with the following seed
        -8590338427130770590
        
      6. Teleport to the following coordinates
        /tp -572 120 3663
        
      7. Delete the world as you don't need it anymore
      8. 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                3 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: