mojira.dev
MC-301291

Slimes do not spawn at the same rate as magma cubes when spawned from monster spawners.

While creating the mod https://modrinth.com/mod/no-peaceful-despawn I discovered a vanilla bug.
Slimes do not seem to account for not being in slime chunks when spawned in from monster spawner blocks.

Yarn mappings have this

ChunkPos chunkPos = new ChunkPos(pos);
boolean bl = ChunkRandom.getSlimeRandom(chunkPos.x, chunkPos.z, ((StructureWorldAccess)world).getSeed(), 987234911L).nextInt(10) == 0;
if (random.nextInt(10) == 0 && bl && pos.getY() < 40) {
    return canMobSpawn(type, world, spawnReason, pos, random);
}

I went back to confirm this is a bug in vanilla by playing an unmodified version of minecraft and created a test environment in superflat.


How do reproduce the bug:
Create a creative superflat void world with cheats in any version of minecraft such as 1.21.8
Split the spawn platform in half using glass
Place monster spawners down equal distance to the player., one will have magma cubes, and one will have slimes.
Turn the difficulty to hard to increase mob spawns
Turn the time to midnight.
Notice half of the platform has many more magma cubes than slimes.

Environment

Java is version 21.0.5, using 64 (amd64) architecture, from Eclipse Adoptium.
AMD Ryzen 5 5600X 6-Core Processor
Advanced Micro Devices, Inc. [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] (rev c8)
Kernel driver in use: amdgpu
Kernel: Linux 6.16.1-gentoo-wellswole-v15
OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.1.8
OS: Gentoo Linux x86_64

Attachments

Comments 4

Hi!
Could you upload a video showing this issue?

This ticket will automatically reopen when you reply.

Sorry it took so long to reply, minecraft is on my secondary email lol

Thanks for the video! It would also be much appreciated if you could attach a copy of the world you showcased in the video, allowing us to skip the necessity to recreate what you’ve already done.

I already deleted the world 😕 I will say this is harder to debug without slime chunks showing up as an option in the f3 menu, perhaps that could be a new feature?

ActuallyTheOwner

(Unassigned)

Unconfirmed

(Unassigned)

1.21.8, 25w34b

Retrieved