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

Nether cave/tunnel generator produces incorrect/cut tunnels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Snapshot 13w09c
    • Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09b
    • Platform/environment shouldn't matter, as the bug is in the java code.
      (Windows 7 64-bit, java 7 64-bit, naturally unmodified Minecraft).
    • Plausible
    • Creative

      The tunnels/caves in Nether can have unnatural looking straight cuts/walls at chunk borders. The reason is an old bug that has been fixed from the overworld cave generator, but not from the Nether one. Such tunnels are easiest to find by using a mapper (due to the difficulty of moving in Nether, low visibility, and of course because tunnels/caves are usually more or less buried inside solid stuff).

      Examples of buggy tunnels
      See map screenshots; the straight edges of the tunnels are not due to mapping program, but simply because the tunnels have cuts in them, at chunk borders.

      Possibly reproducible with world seed -807116175 (with defaults), location x:142, y:98, z:-83 in Nether (place of screenshot cut_tunnel_3 and ...02.24.27). The location is actually two tunnels, both cut at the same place, but just cut on different directions. (The other map screenshots are of the same world, locations are about #1: 187,99,135 and #2 131,94,260 + 60,85,235.)

      The bug
      Compare classes MapGenCaves and MapGenCavesHell. The overworld version (MapGenCaves) transfers a random generator seed-parameter in the methods, while the Nether-version does not. Due to this, for the Nether version the map generator's one common random number generator gets to different states at different chunks for the generation of the supposedly same tunnel/cave. The different states of course lead to different random shapes of the tunnel.

      The fix
      Adapt the use of the seed parameter from the MapGenCaves class to MapGenCavesHell class. (I will not show the code here, as the changes are quite spread and are trivial.)

        1. 2013-01-12_02.24.27.png
          638 kB
          Markku
        2. cut_tunnel_1.PNG
          3 kB
          Markku
        3. cut_tunnel_2.PNG
          11 kB
          Markku
        4. cut_tunnel_3.PNG
          4 kB
          Markku

            jeb [Mojang] Jeb (Jens Bergensten)
            bugi74 Markku
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: