mojira.dev
MC-127331

Mobs not spawning in world spawn area

Hostile mobs do not spawn in the world spawn area, but spawn fine in other areas.

Tested by creating a flat-world with only bedrock, and making two spawnable areas 10x10 blocks, one located at world-spawn (marked in the picture by diamond block, identified using compass), and the other a few blocks away.

Standing an equal distance of around 30 blocks from both, it is quickly apparent that no mobs spawn near the world spawn.

Attachments

Comments 1

I tested this, and this happens in 1.12.2 as well. But: This is almost definitely an intended feature. This is the code that causes this behaviour:

WorldEntitySpawner.java

BlockPos blockpos1 = worldServerIn.getSpawnPoint();

// ...

if (!worldServerIn.isAnyPlayerWithinRangeAt((double)f, (double)i3, (double)f1, 24.0D) && blockpos1.distanceSq((double)f, (double)i3, (double)f1) >= 576.0D)
{
    // spawn mob(s) ...

This means that no mob can spawn less than 24 blocks from the world spawn point away. (f is the x coordinate of the mob to spawn, i3 the y coordinate, and f1 the z coordinate.

(I used MCP940 for 1.12.2 to check the code)

Ann

(Unassigned)

Unconfirmed

Minecraft 18w11a

Retrieved