<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:23:55 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-10303] Slimes do not spawn at world spawn point</title>
                <link>https://bugs.mojang.com/browse/MC-10303</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;I made a custom superflat in creative mode using seed -6310548451344270339 (I used one layer of bedrock, one layer of clay). Spawn point is at (x=288,z=592). I created a fence grid on the chunk boundaries to determine where exactly slimes spawn.&lt;/p&gt;

&lt;p&gt;Available &quot;slime finder&quot; utilities (see &lt;a href=&quot;http://www.minecraftwiki.net/wiki/Slime#Slime_Finding_Tools&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.minecraftwiki.net/wiki/Slime#Slime_Finding_Tools&lt;/a&gt; ) show valid slime chunks at (x=272,z=576) to (x=288,z=592) and (x=288,z=592) to (x=304,z=608). &lt;/p&gt;

&lt;p&gt;On a normal world, these chunks do successfully spawn slimes. On this superflat, though, no slimes spawn in these chunks (see red-marked areas in pic). Other slime chunks appear to work fine (left side of pic).&lt;/p&gt;

&lt;p&gt;So are these valid slime chunks? Or is this working as expected, but the slime finder utilities have an outdated algorithm, or are missing an exception for superflats? If so, can we have the corrected algorithm? Was this due to the slime spawning changes made in 12w25a?&lt;/p&gt;

&lt;p&gt;(Search found a possibly-related closed ticket, &lt;a href=&quot;https://bugs.mojang.com/browse/MC-9440&quot; title=&quot;Slimes do not spawn on Superflat Worlds&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-9440&quot;&gt;&lt;del&gt;MC-9440&lt;/del&gt;&lt;/a&gt;, but without the detail and pics)&lt;/p&gt;</description>
                <environment>Windows Vista 64-bit</environment>
        <key id="24249">MC-10303</key>
            <summary>Slimes do not spawn at world spawn point</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="6">Works As Intended</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="megatrain">Brad Corbin</reporter>
                        <labels>
                            <label>chunk</label>
                            <label>slime</label>
                            <label>superflat-world</label>
                    </labels>
                <created>Tue, 26 Feb 2013 09:26:13 +0100</created>
                <updated>Fri, 21 Jul 2017 13:05:11 +0200</updated>
                            <resolved>Tue, 19 Mar 2013 21:38:25 +0100</resolved>
                                    <version>Minecraft 1.4.7</version>
                                                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="58326" author="megatrain" created="Mon, 1 Apr 2013 17:12:26 +0200"  >&lt;p&gt;Thanks, Markku, for your testing on this. This seems correct, as I tried to replicate the problem on several other seeds, but could never get it to replicate. I realize now I was testing other chunks besides the world spawn.&lt;/p&gt;</comment>
                            <comment id="55573" author="bugi74" created="Tue, 19 Mar 2013 21:34:37 +0100"  >&lt;p&gt;Created &lt;a href=&quot;https://bugs.mojang.com/browse/MC-12395&quot; title=&quot;Player spawnpoint used in monster spawning seems to be unaffected by sleeping in bed or /spawnpoint command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-12395&quot;&gt;&lt;del&gt;MC-12395&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="55551" author="kumasasa" created="Tue, 19 Mar 2013 20:49:02 +0100"  >&lt;p&gt;Markku, create a new ticket (refering to this one), then we&apos;ll resolve this.&lt;/p&gt;</comment>
                            <comment id="55451" author="bugi74" created="Tue, 19 Mar 2013 15:30:22 +0100"  >&lt;p&gt;I checked the code related to this, and while slime spawning has been made very rare (and there are changes for the higher level swampland spawning in 1.5, but not for lower level spawning), to the point of making testing this without adjusting the probabilities near impossible, the reason for the described lack of spawning is sort of an intended feature - the world spawn point is near those two non-spawning chunks and spawning is prevented on those areas. The idea behind this is probably to keep the spawn point somewhat clear/safe.&lt;/p&gt;

&lt;p&gt;The reason why all chunks worked on normal world is likely because the spawn point will be higher up (vertical distance matters, too), and slime spawning was tested on lower levels.&lt;/p&gt;

&lt;p&gt;However, that intended feature seems to be a bit bugged these days, when all games are server-based (and thus sort of multiplayer). Changing the solo-player&apos;s spawn point will not change the &lt;em&gt;world&apos;s&lt;/em&gt; spawnpoint, which is the one used in the mob spawn test. Thus, the player&apos;s spawn point will be vulnerable to mob spawning, while that unused world spawnpoint messes up spawning in a seemingly random area (like in this issue). (I tested this by using /spawnpoint command to move my spawnpoint; nothing changed, issue continues.)&lt;/p&gt;

&lt;p&gt;Thus, I&apos;d resolve this one with &quot;works as intended&quot; (as in, spawnpoint area is kept clear), and open up a new issue for the problem I described (i.e. using incorrect spawnpoint in the prevention check), as it affects all hostile mobs and game modes, not just slimes/super-flat.&lt;/p&gt;</comment>
                            <comment id="55307" author="kumasasa" created="Tue, 19 Mar 2013 00:35:10 +0100"  >&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="51854" author="bugi74" created="Mon, 11 Mar 2013 19:35:18 +0100"  >&lt;p&gt;That world/terrain type check is the very first logic check in the method, and its Random is generated properly (i.e. it should provide good enough randomness).&lt;/p&gt;

&lt;p&gt;I also expect that 75% skip chance to apply equally to every chunk (and every slime). The only explanation/idea I have had (and its related further test) I already explained earlier.&lt;/p&gt;</comment>
                            <comment id="51852" author="megatrain" created="Mon, 11 Mar 2013 19:24:41 +0100"  >&lt;p&gt;Right, but I would have expected it to give an equal 75% nerf in all (valid) slime chunks, and not to give a complete nerf to 75% of all slime chunks? (Not sure if that&apos;s really what is happening here, I don&apos;t think 75% of slime chunks are broken.)&lt;/p&gt;

&lt;p&gt;Unless the value of this.rand.nextInt(4) is somehow being determined by the chunk coordinates? So where exactly is THIS.RAND being created/initialized? Is it a global object, or is it initialized earlier in the EntitySlime.getCanSpawnHere() routine?&lt;/p&gt;

&lt;p&gt;Ah, I bet that&apos;s it. If the sequence looks something like (combining the wiki code and your code with a dash of speculation):&lt;/p&gt;

&lt;p&gt;EntitySlime.getCanSpawnHere()&lt;/p&gt;

&lt;p&gt;...&lt;br/&gt;
//check if we&apos;re in a valid slime chunk&lt;br/&gt;
Random rand = new Random(seed + &lt;br/&gt;
(long) (xPosition * xPosition * 0x4c1906) + &lt;br/&gt;
(long) (xPosition * 0x5ac0db) + &lt;br/&gt;
(long) (zPosition * zPosition) * 0x4307a7L + &lt;br/&gt;
(long) (zPosition * 0x5f24f) ^ 0x3ad8025f);&lt;/p&gt;

&lt;p&gt;if (this.rand.nextInt(10) == 0) &lt;/p&gt;
  { 
   //we&apos;re in a valid slime chunk
  }
&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;//check for additional nerf for flatland, added in 12w25a&lt;br/&gt;
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT &amp;amp;&amp;amp; this.rand.nextInt(4) != 1) {&lt;br/&gt;
    return false;&lt;br/&gt;
...&lt;/p&gt;

&lt;p&gt;If it looks something like that, then this.rand.nextInt(4) would always generate the same value in the same coordinates, so we&apos;d end up with entire slime chunks non-functional, like I&apos;m describing in the original ticket description. &lt;/p&gt;</comment>
                            <comment id="51841" author="bugi74" created="Mon, 11 Mar 2013 16:50:51 +0100"  >&lt;p&gt;The effect of that per-slime check would likely be that in its place, another mob type would be spawned (somewhere else?). I couldn&apos;t find other checks for world type in that code. And the chunk location check (for lower levels) is still the same as shown in wiki.&lt;/p&gt;

&lt;p&gt;From wiki &quot;Spawn&quot;: &quot;There must be no players and no player spawn points within a 24 block distance (spherical) of the spawning block&quot;. While that does not extend far down (unless the spawn point is at low levels), I would not rule out something like that affecting. I wrote one extra test case earlier, and I would now augment it with twist of &quot;keep the player suitable away from the test area, e.g. at least 2 chunks away&quot;.&lt;/p&gt;</comment>
                            <comment id="51800" author="megatrain" created="Mon, 11 Mar 2013 16:04:53 +0100"  >&lt;p&gt;Jeff- Yes, high slime generation was pretty frustrating for flatlands, I believe this was changed back in 12w25a, the wiki mentions &quot;Slimes spawning in Superflat world type has reduced.&quot; The problem is that we weren&apos;t provided with any details about how exactly slime spawning was reduced, and it certainly matters when using a &quot;slime finder&quot; and building slime farms based on the result. I&apos;m not really contending that this is a bug in the game that needs to be fixed, but more of information that players/tool developers/wiki maintainers need to fix our slime finding methods for superflats.&lt;/p&gt;

&lt;p&gt;Markku, thanks for checking on that. As you mention, that appears to be &quot;can I spawn this specific slime&quot; code. What does the &quot;is this a valid slime chunk&quot; code look like? Does it have a similar test for WorldType.FLAT? I&apos;ve pasted the formula from the wiki into an earlier comment, I&apos;m not sure if it bears any resemblance to the game code.&lt;/p&gt;

&lt;p&gt;If the EntitySlime.getCanSpawnHere() code you posted is the only part that mentions WorldType.FLAT, do you have any theories on why those two specific chunks are non-producing, only on flatworlds? They also happen to be directly under the spawnpoint, if you think that might be relevant.&lt;/p&gt;

&lt;p&gt;I&apos;ll see if I can also do some further testing. I had already done a 2x2 test (just the 4 chunks to the right that should have had 2 slime chunks) and couldn&apos;t generate any slimes. &lt;/p&gt;</comment>
                            <comment id="50841" author="bugi74" created="Thu, 7 Mar 2013 21:44:14 +0100"  >&lt;p&gt;A bit of light:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;EntitySlime.getCanSpawnHere()&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        ...
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT &amp;amp;&amp;amp; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.rand.nextInt(4) != 1) {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;false&lt;/span&gt;;
        ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;That is, if the world type is superflat, there is a 75% chance it will just decide that no, not spawning that one. (Although that should only be per-slime check, not per-chunk). Also, there are different rules for spawning at surface levels than spawning on the lower levels. The wiki-formula only applies to the lower levels (below 40).&lt;/p&gt;

&lt;p&gt;There can be other things affecting it. For example, if one part of map spawns lots (due to it being so easy to spawn slimes there), when the algorithm gets to other parts, the maximum numbers have been reached already. I didn&apos;t check for this at all, just a quick example what sort of rule-tangles can affect the issue.&lt;/p&gt;

&lt;p&gt;I&apos;d suggest a further test. Fill the chunks that now do spawn slimes (so that no mobs can spawn there), and see if the now-empty chunks would then get some slimes.&lt;/p&gt;</comment>
                            <comment id="50832" author="jeuvke" created="Thu, 7 Mar 2013 21:16:09 +0100"  >&lt;p&gt;I think these are valid slime chunks but the reason that they spawn only little slimes is because of complaints that superflat worlds spawned huge amounts of slimes.&lt;/p&gt;</comment>
                            <comment id="48557" author="megatrain" created="Fri, 1 Mar 2013 05:33:43 +0100"  >&lt;p&gt;More extensive test with better results. Same seed and location as the other screenshot. The two left slime chunks are obvious, the top middle should be one, but has only spawned a very small number. The chunk on the bottom right should also be a slime chunk, according to slime finders.&lt;/p&gt;</comment>
                            <comment id="47951" author="megatrain" created="Wed, 27 Feb 2013 14:56:35 +0100"  >&lt;p&gt;Quick update: I did some further testing, and confirmed that these two chunks discussed above, (x=272,z=576) to (x=288,z=592) and (x=288,z=592) to (x=304,z=608), are valid slime chunks in a normal world (not superflat). I generated a world with the same seed, dug down to level 10, cleared out and lit up these chunks, separating them by fences. Slimes spawned in all the chunks indicated on the slime finder map.&lt;/p&gt;</comment>
                            <comment id="47662" author="megatrain" created="Tue, 26 Feb 2013 15:04:31 +0100"  >&lt;p&gt;The wiki page on slime generation lists the following as the formula used to calculate slime chunks:&lt;/p&gt;

&lt;p&gt;Random rnd = new Random(seed + &lt;br/&gt;
                        (long) (xPosition * xPosition * 0x4c1906) + &lt;br/&gt;
                        (long) (xPosition * 0x5ac0db) + &lt;br/&gt;
                        (long) (zPosition * zPosition) * 0x4307a7L + &lt;br/&gt;
                        (long) (zPosition * 0x5f24f) ^ 0x3ad8025f);&lt;br/&gt;
return rnd.nextInt(10) == 0;&lt;/p&gt;

&lt;p&gt;I assume that this is the formula used by all the slime-finder tools. If this formula is no longer correct for superflats, that would be really handy to know &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="47650" author="megatrain" created="Tue, 26 Feb 2013 09:33:21 +0100"  >&lt;p&gt;Note that the pillar holding the anvil in the screenshot corresponds to x=288,z=592, which is the center point of the slime finder map. There should be four valid slime chunks near the center, but only the left two appear to actually work on superflats.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="23045">MC-9440</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="27234">MC-12395</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="22435" name="2013-02-26_01.27.45.png" size="551073" author="megatrain" created="Tue, 26 Feb 2013 09:26:13 +0100"/>
                            <attachment id="22840" name="2013-02-28_21.34.33.png" size="810444" author="megatrain" created="Fri, 1 Mar 2013 05:33:43 +0100"/>
                            <attachment id="22436" name="slimefinder.png" size="68341" author="megatrain" created="Tue, 26 Feb 2013 09:26:13 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0jysf:</customfieldvalue>

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