mojira.dev
MC-10303

Slimes do not spawn at world spawn point

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.

Available "slime finder" utilities (see http://www.minecraftwiki.net/wiki/Slime#Slime_Finding_Tools ) show valid slime chunks at (x=272,z=576) to (x=288,z=592) and (x=288,z=592) to (x=304,z=608).

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

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?

(Search found a possibly-related closed ticket, MC-9440, but without the detail and pics)

Linked issues

Attachments

Comments 15

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.

The wiki page on slime generation lists the following as the formula used to calculate slime chunks:

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

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 🙂

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.

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.

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.

5 more comments

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.

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.

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.

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's spawn point will not change the world's spawnpoint, which is the one used in the mob spawn test. Thus, the player'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.)

Thus, I'd resolve this one with "works as intended" (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.

Markku, create a new ticket (refering to this one), then we'll resolve this.

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.

Brad Corbin

(Unassigned)

Unconfirmed

chunk, slime, superflat-world

Minecraft 1.4.7

Retrieved