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.
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
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, andf1
the z coordinate.(I used MCP940 for 1.12.2 to check the code)