mojira.dev
MC-264187

Spawners with their light limits set to ranges that don't include 15 don't spawn mobs under the night sky

Mobs will not spawn from spawners if the spawners custom spawn rule light value is less than 15 and they are under open sky.  So the block level is 0 and the client screen display is pitch black with stars, the "skylight" value is 15 and blocks spawning.

   
Then when you put a roof over it, blocking the "skylight", it will begin spawning.

/setblock ~1 ~1 ~ spawner{SpawnData:{entity:

{id:"minecraft:skeleton"}

,custom_spawn_rules:

{block_light_limit:[0,14],sky_light_limit:[0,14]}

}}

 

This example without custom spawn rules will spawn mobs at night under an open sky.

/setblock ~1 ~1 ~ spawner{SpawnData:{entity:

{id:"minecraft:skeleton"}

}}

 

The bug is in the BaseSpawner class in the serverTick method.

 

It should probably use the calculated skylight value adjusted for time of day and weather like normal spawning.

Comments 1

Confirmed in 1.20.2

stephen m mcleod

(Unassigned)

Community Consensus

Platform

Normal

Mob spawning

1.20.1, 1.20.2

Future Update

Retrieved