[MC-7196] Nether cave/tunnel generator produces incorrect/cut tunnels Created: 12/Jan/13  Updated: 14/Aug/20  Resolved: 01/Mar/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09b
Fix Version/s: Snapshot 13w09c

Type: Bug
Reporter: Markku Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 2
Labels: cave, nether, tunnel, world-generation
Environment:

Platform/environment shouldn't matter, as the bug is in the java code.
(Windows 7 64-bit, java 7 64-bit, naturally unmodified Minecraft).


Attachments: PNG File 2013-01-12_02.24.27.png     PNG File cut_tunnel_1.PNG     PNG File cut_tunnel_2.PNG     PNG File cut_tunnel_3.PNG    
Issue Links:
Relates
relates to MC-172887 Circular caves below lava level in th... Resolved
relates to MC-7200 Cave/tunnel generation may cut tunnel... Resolved
CHK:
Confirmation Status: Plausible
Game Mode: Creative

 Description   

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



 Comments   
Comment by Josh74000MC [ 06/Aug/18 ]

this bug used to happen on beta 1.7.3, but got fixed in beta 1.8 which is good as it got annoying.

Comment by [Mojang] Jeb (Jens Bergensten) [ 01/Mar/13 ]

Fixed as suggested.

Comment by Markku [ 28/Feb/13 ]

Still valid for 13w09b, and even if there is new stuff in Nether, the example seed and location still works.

Generated at Sun Jan 12 12:13:42 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.