Due to bugfix MC-264187 spawners can no longer spawn mobs at night time when placed underground (or just simply anywhere that skylight doesn’t reach). Since spawners now take the darkness of the sky into account, this calculated skylight value can end up below zero if the area the spawner is in had 0 skylight to begin with.
This in turn fails the range check between 0 and 15 if the provided value is for example -11, causing the mob not to spawn.
Reproduction steps
Create a flat world.
Prevent mobs from spawning naturally:
/gamerule spawn_monsters falseCreate a simple spawner using custom spawn rules:
/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"minecraft:skeleton"},custom_spawn_rules:{block_light_limit:[0,15],sky_light_limit:[0,15]}}}Fly up above the spawner and create a roof, preventing skylight from reaching the spawner:
/fill ~-20 ~ ~-20 ~20 ~ ~20 tinted_glassSet the time to night:
/time set midnight
The spawner is unable to spawn mobs in this condition. Now remove a block in the roof above the spawner or let it become daytime and it will immediately start spawning mobs again.
Comments 0
No comments.