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

The generation of "terrain" surface layer in Nether produces local straight artifacts/glitches (partial fix included)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09c, Minecraft 1.5, Minecraft 1.7.5, Minecraft 15w47c, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 1.11, Minecraft 17w16b, Minecraft 18w06a, Minecraft 18w07a, Minecraft 18w08a
    • Fix Version/s: Minecraft 18w16a
    • Environment:

      Windows 7 64-bit, java 7 64-bit

    • Confirmation Status:
      Confirmed

      Description

      This bug is very closely related to MC-6820, as the mistakes in the code are virtually the same.

      What seems to be wrong
      In Nether, due to the way the terrain surface features are made, the artifacts are very difficult to notice while playing, but using a map (with ability to see "slices") reveals similar artifacts as the same bug for the overworld generator produces. They are easiest to notice at levels just below the top bedrock as straight "cuts" in the hidden "basins" (of layer of one block air ) just below the bedrock. See the attached screenshot of a map, the brighter brown blobs with straight east-west cuts. The cuts are exactly at chunk borders.

      The bugged code is in ChunkProviderHell.replaceBlocksForBiome(int, int, byte[]), in almost begin of the method. However, this time I've replaced the MCP decompilation result with my own interpretations for some of the variable names:

      ChunkProviderHell.replaceBlocksForBiome(int, int, byte[])
              this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, par1 * 16, par2 * 16, 0, 16, 16, 1, d, d, 1.0D);
              this.gravelNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.gravelNoise, par1 * 16, 109, par2 * 16, 16, 1, 16, d, 1.0D, d);
              this.netherrackExclusivityNoise = this.netherrackExculsivityNoiseGen.generateNoiseOctaves(this.netherrackExclusivityNoise, par1 * 16, par2 * 16, 0, 16, 16, 1, d * 2.0D, d * 2.0D, d * 2.0D);
      

      Note the difference in the order of Y and Z parameters between method calls.

      What I expect
      The blobs (and few other less easily seen features) should have curving/natural shapes and no artifical straight east-west cuts. Sorry, no good screenshot about it, but just imagine that bug-example screenshot having the blobs' south side cuts replaced with something similar to their north sides.

      The fixed code would be:

      ChunkProviderHell.replaceBlocksForBiome(int, int, byte[])
              this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, par1 * 16, 0, par2 * 16, 16, 1, 16, d, 1.0D, d);
              this.gravelNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.gravelNoise, par1 * 16, 109, par2 * 16, 16, 1, 16, d, 1.0D, d);
              this.netherrackExclusivityNoise = this.netherrackExculsivityNoiseGen.generateNoiseOctaves(this.netherrackExclusivityNoise, par1 * 16, 0, par2 * 16, 16, 1, 16, d * 2.0D, d * 2.0D, d * 2.0D);
      

      HOWEVER only the 3rd line is for this particular case, even if the first line has the same bug (and fix). The problem with the first line's fix is that it unfortunately reveals that the gravel-generation was based on a side-effect of that bug, and the first line fix makes slowsand always overwrite gravel. Full fix for that needs more knowledge on how the generateNoiseOctaves can be used and/or an additional adjustment later in the same method.

      Example seed and coords:
      8833675719584443437
      270 126 -80

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bugi74 Markku
              • Votes:
                7 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: