<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:12:28 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[MC-6820] The generation of terrain surface layer produces local straight glitches (fix included)</title>
                <link>https://bugs.mojang.com/browse/MC-6820</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;(Closely related to &lt;a href=&quot;https://bugs.mojang.com/browse/MC-7192&quot; title=&quot;The generation of &amp;quot;terrain&amp;quot; surface layer in Nether produces local straight artifacts/glitches (partial fix included)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-7192&quot;&gt;&lt;del&gt;MC-7192&lt;/del&gt;&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;The seed for the world of two first screenshots (with swamp and desert) is -807116175.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Bug as seen in 1.4.7&lt;/b&gt;&lt;br/&gt;
Attached screenshot (..00.18) shows the visual effect of the problem with unmodified 1.4.7: one block too little sand in a straight line form, often repeating in 16-block period. The problem may affect other than sand surface, too. Note, the area around had not yet been fully loaded/generated at the time of the screenshot, so ignore the missing stuff in the distance.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What I expect to be seen&lt;/b&gt;&lt;br/&gt;
The other screenshot (..01.53) shows the same world and the same location after applying the proposed code fix shown below.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Background/other info&lt;/b&gt;&lt;br/&gt;
Examples of the bug are quite easy to find in almost any world, given enough flying around. While mostly investigating this in creative mode, it should be just as valid for survival mode.&lt;/p&gt;

&lt;p&gt;(Note, this same problem has been around since a loooong time ago, and I submitted a bug report and (almost) the same fix back then. Apparently it was never fixed back then and the soon after implemented changes to terrain generation just made it less noticeable, or the bug has crawled back in.)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Bugged code&lt;/b&gt;&lt;br/&gt;
The bugged part of code (as seen with MCP 7.26) is:&lt;br/&gt;
ChunkProviderGenerate.replaceBlocksForBiome(int, int, byte[], BiomeGenBase[]), 3rd line of the method:&lt;br/&gt;
this.stoneNoise = this.noiseGen4.generateNoiseOctaves(this.stoneNoise, par1 * 16, par2 * 16, 0, 16, 16, 1, var6 * 2.0D, var6 * 2.0D, var6 * 2.0D);&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Fixed code&lt;/b&gt;&lt;br/&gt;
The fixed version swaps the latter two coordinate axes (Y and Z, I suppose):&lt;br/&gt;
this.stoneNoise = this.noiseGen4.generateNoiseOctaves(this.stoneNoise, par1 * 16, 0, par2 * 16, 16, 1, 16, var6 * 2.0D, var6 * 2.0D, var6 * 2.0D);&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Added&lt;/b&gt;&lt;br/&gt;
One more screenshot and map snippet, from very old worlds, at the time when I first checked this and made the fixes. The map snippet should clearly visualize it is not about &quot;basins&quot;, and the screenshot also shows it is (back then) not about basins, as it was between sand and dirt at the same level. (This difference is because back then the same bug could affect not only thickness, but also the material, if I remember it right. I did have to make changes to 3 more lines in that same method to get all the related things fixed, but with the new biome code, only 1 line is enough.)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Added more&lt;/b&gt;&lt;br/&gt;
The stone-gray screenshot is taken with a modified client, in order to reveal the full extent of the bug. I modified the world generator to create the ground at fixed height of 7, and for the replace method (which has the bug) to switch the surface stone layer into air instead of dirt or sand. This way the height variation on the ground is actually showing only the surface layer thickness function (and some further random features, like those small ponds, caves and ravines).&lt;/p&gt;

&lt;p&gt;As can be seen, there are a lot of straight long east-west steps, exactly at chunk borders. Most of the effect is normally hidden by the random variation in the height of ground. That is, the visual effect of this bug is hidden below random noise of the normal ground level function. One would not detect that bad signs if all the dirt/sand would be digged away in a normally generated map, but the effect is still there.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Uh oh, there is even more&lt;/b&gt;&lt;br/&gt;
I&apos;m going to make another entry about an equal bug for Nether, but FYI, the corresponding class and method for Nether has the same bug, and another similar, as it is basically an adapted copy of the older overworld generator (with its multiple bugs it had back then).&lt;/p&gt;</description>
                <environment>Platform/environment shouldn&amp;#39;t matter, as the bug is in the java code.&lt;br/&gt;
(Windows 7 64-bit, java 7 64-bit, naturally unmodified Minecraft).</environment>
        <key id="19592">MC-6820</key>
            <summary>The generation of terrain surface layer produces local straight glitches (fix included)</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="jeb">[Mojang] Jeb (Jens Bergensten)</assignee>
                                    <reporter username="bugi74">Markku</reporter>
                        <labels>
                            <label>overworld</label>
                            <label>terrain</label>
                            <label>world-generation</label>
                    </labels>
                <created>Thu, 10 Jan 2013 18:45:26 +0100</created>
                <updated>Fri, 14 Aug 2020 02:53:52 +0200</updated>
                            <resolved>Mon, 9 Sep 2013 14:11:27 +0200</resolved>
                                    <version>Minecraft 1.4.6</version>
                    <version>Minecraft 1.4.7</version>
                    <version>Snapshot 13w07a</version>
                    <version>Snapshot 13w09b</version>
                    <version>Snapshot 13w09c</version>
                    <version>Minecraft 1.5</version>
                    <version>Minecraft 1.6.1</version>
                    <version>Minecraft 1.6.2</version>
                                    <fixVersion>Minecraft 13w36a</fixVersion>
                                                        <votes>7</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="101824" author="jeb" created="Mon, 9 Sep 2013 14:11:27 +0200"  >&lt;p&gt;Thanks for the research. I actually found the same problem while I was investigating how the noise patterns worked. Should be fixed in the 1.7 snapshots.&lt;/p&gt;</comment>
                            <comment id="87751" author="ezekielelin" created="Wed, 10 Jul 2013 04:04:25 +0200"  >&lt;p&gt;Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.&lt;/p&gt;</comment>
                            <comment id="48396" author="bugi74" created="Thu, 28 Feb 2013 19:25:41 +0100"  >&lt;p&gt;Added &apos;example_in_137.png&apos;. Seed &quot;137&quot; (defaults), location about 20, 240. (Easier to type in and get to than the mycelium one).&lt;/p&gt;</comment>
                            <comment id="47755" author="bugi74" created="Tue, 26 Feb 2013 19:10:38 +0100"  >&lt;p&gt;Added stripes_on_mycelium.png, example from issue &lt;a href=&quot;https://bugs.mojang.com/browse/MC-10296&quot; title=&quot;Basin destroy mycelium, and the sceenshot uploader on this site doesn&amp;#39;t work for me, so I&amp;#39;ll get it to you soon&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-10296&quot;&gt;&lt;del&gt;MC-10296&lt;/del&gt;&lt;/a&gt;. It is better than my original screenshot for this issue. Notice the z coordinate; the straight mycelium-stone edges run east-west along the chunk borders.&lt;/p&gt;</comment>
                            <comment id="47637" author="thehoodedteddy13" created="Tue, 26 Feb 2013 01:37:40 +0100"  >&lt;p&gt;Yup, this is the exact problem I had.  exept mine destroyed half my mushroom biome.  &lt;br/&gt;
E:  and the exact same thoughts.  THE EXACT&lt;/p&gt;</comment>
                            <comment id="35277" author="bugi74" created="Fri, 11 Jan 2013 01:50:27 +0100"  >&lt;p&gt;After analyzing the source code a bit more, I figured that there is a specific piece of code just to create &quot;basins&quot; (i.e. areas where stone is seen directly), and it indeed works by detecting when the surface layer thickness function returns negative values. After a bit of flying around, I was able to find a proper natural looking basin even when that fix was in effect (and thus the basin had no straight edges).&lt;/p&gt;

&lt;p&gt;So, while the fix does change the surface layer thickness all around (and thus locations of basins will not match before and after the fix), basins will still exist, and the straight edges will not.&lt;/p&gt;</comment>
                            <comment id="35262" author="bugi74" created="Fri, 11 Jan 2013 01:07:53 +0100"  >&lt;p&gt;Added one more screenshot, this one with a bit modified client in order to reveal the full extent of the bug.&lt;/p&gt;</comment>
                            <comment id="35223" author="bugi74" created="Fri, 11 Jan 2013 00:32:06 +0100"  >&lt;p&gt;In that particular location (of my screenshot) it indeed hides it all. Which should indicate that at that position, there shouldn&apos;t be any &quot;basin&quot; to start with. I can try and find a spot with a &quot;real&quot; basin (when generated with my fixed code), but do not hold your breath, as it is actually possible that no basins should exist at all, as they &lt;em&gt;could&lt;/em&gt; be just a side effect of this bug.&lt;/p&gt;

&lt;p&gt;Note, there is a better way to create such basins than swapping to coordinates. Namely, just increase the variation range for the surface layer thickness a little bit (to the lesser direction) and clip at 0.&lt;/p&gt;</comment>
                            <comment id="35222" author="bljat" created="Fri, 11 Jan 2013 00:31:36 +0100"  >&lt;p&gt;Alright reopening.&lt;/p&gt;</comment>
                            <comment id="35214" author="bugi74" created="Fri, 11 Jan 2013 00:24:56 +0100"  >&lt;p&gt;Older example and map snippet.&lt;/p&gt;</comment>
                            <comment id="35211" author="bljat" created="Fri, 11 Jan 2013 00:23:51 +0100"  >&lt;p&gt;Well as far as I can tell your fix does not only remove the straight line, but the hole basin itself. Looking at the original generation of the basin, it extends beyond those straight lines.&lt;/p&gt;</comment>
                            <comment id="35197" author="bugi74" created="Fri, 11 Jan 2013 00:15:57 +0100"  >&lt;p&gt;It sure is a bug. Or really silly joke from the developer who swapped the two coordinate parameters.&lt;/p&gt;

&lt;p&gt;Back when I first checked it out, there were 3 similar code lines in that location. The two other lines had parameters in the order x, y, z, but this one bugged line had (and still has) the parameters in the order x, z, y, and they all called the same method. Also, if the &quot;feature&quot; was indeed a intended, those &quot;basins&quot; would have natural edges, not straight steps repeated at every chunk edge and running sometimes for more than 30-40 blocks.&lt;br/&gt;
(EDIT: I found my old notes; it was 1 line correctly, 2 lines incorrectly, and a misunderstanding when using a noise-generation function.)&lt;/p&gt;

&lt;p&gt;I still have somewhere some even worse screenshots (but I can not redo those worlds any more as the terrain generation changes made old seeds useless), once with &quot;combs&quot; of more than 10 such stripes in a row. The problem was much more stronger back then.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://bugs.mojang.com/browse/MC-1242&quot; title=&quot;randomly missing topmost layers of the landscape&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-1242&quot;&gt;&lt;del&gt;MC-1242&lt;/del&gt;&lt;/a&gt; provides two screenshots, neither showing straight edges on chunk borders. They &lt;em&gt;could&lt;/em&gt; be because of this bug (just so small patches that one can not notice the problem), or they could just as well be proper small &quot;basins&quot;. So, I can not say whether this is duplicate of that issue or not. Nor can any moderator unless they have better information at hand (like facts from MC developers or access to unobfuscated MC source code).&lt;/p&gt;

&lt;p&gt;Note, basins can be indeed a feature, but the straight edges are definitely not. Or does those stripes in my screenshot look like a &quot;basin&quot;?!?  Also, the screenshot in the wiki-article has nice natural looking random curves along top and bottom of the picture, but the right and left sides are showing symptoms of those straight edges. Straight edges &lt;em&gt;are&lt;/em&gt; possible even normally (just random luck...), but when they are long, and repeat exactly at chunk borders, luck has nothing to do with it. (I can not say yes or no for that wiki screenshot, as I would need to be at the spot, looking at F3-coordinates... But the screenshot I provided for this bug report does have the glitches exactly at chunk edges (as can be noticed from the F3 data)).&lt;/p&gt;

&lt;p&gt;Note, minecraftwiki is written mostly by people who do not &quot;read the source code&quot; (and btw, I do, although decompiled only), and they make often incorrect assumptions. For example, that section about basins seems to be lacking any references (to developers or claims of reading source code) that would validate what is written. Unless wikitext provides credible sources/references, it should not be used as an authority.&lt;/p&gt;</comment>
                            <comment id="35151" author="bljat" created="Thu, 10 Jan 2013 23:35:30 +0100"  >&lt;p&gt;That&apos;s not a bug, it&apos;s a world gen feature, a so called &quot;basin&quot;. Threrefore duplicate of &lt;a href=&quot;https://bugs.mojang.com/browse/MC-1242&quot; title=&quot;randomly missing topmost layers of the landscape&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-1242&quot;&gt;&lt;del&gt;MC-1242&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="35133" author="bugi74" created="Thu, 10 Jan 2013 23:06:14 +0100"  >&lt;p&gt;This is NOT a duplicate of that whole chunk stripes. Look more carefully at the screenshots provided, this bug only affects the surface layer locally. It does NOT affect e.g. trees etc. and typically does not continue for long distances, like that other bug does. Also, this same bug has been around for a very long time, well before that striped chunks -bug appeared.&lt;/p&gt;

&lt;p&gt;(Oh, and I DID use the search, and did see/find that other bug, and after few seconds could easily realize it is different issue.)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="24240">MC-10296</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="12563">MC-1242</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="19971">MC-7192</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11677">MC-411</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="17906" name="2013-01-10_18.00.18.png" size="2017067" author="bugi74" created="Thu, 10 Jan 2013 18:45:26 +0100"/>
                            <attachment id="17907" name="2013-01-10_18.01.53.png" size="2069212" author="bugi74" created="Thu, 10 Jan 2013 18:45:26 +0100"/>
                            <attachment id="18094" name="2013-01-11_02.05.28.png" size="776263" author="bugi74" created="Fri, 11 Jan 2013 01:07:53 +0100"/>
                            <attachment id="18062" name="area_3_bugged.png" size="2329226" author="bugi74" created="Fri, 11 Jan 2013 00:24:56 +0100"/>
                            <attachment id="22793" name="example_in_137.png" size="953533" author="bugi74" created="Thu, 28 Feb 2013 19:25:41 +0100"/>
                            <attachment id="18063" name="sand_bugged_map_2.png" size="31511" author="bugi74" created="Fri, 11 Jan 2013 00:24:56 +0100"/>
                            <attachment id="22496" name="stripes_on_mycelium.png" size="2313682" author="bugi74" created="Tue, 26 Feb 2013 19:10:38 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 11 Jan 2013 21:25:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10303"><![CDATA[Confirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10501" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Game Mode</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Creative]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_11100" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Linked</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0anxb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>