The bug
Some monsters are allowed to exist in peaceful mode; namely, hoglins, piglins, and sulfur cubes. They can be spawned with spawn eggs or spawner blocks, and as of 26.2 snapshot 4, they can even spawn naturally.
However, if a spawner block declares custom_spawn_rules, these mobs cannot spawn in peaceful mode.
How to reproduce
/difficulty peaceful/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"hoglin"}},MaxSpawnDelay:0s,MinSpawnDelay:0s}
-> ✔ It immediately spawns hoglinsFly somewhere else
/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"hoglin"},custom_spawn_rules:{}},MaxSpawnDelay:0s,MinSpawnDelay:0s}
-> ❌ No hoglins ever spawn
Expected result
Hoglins should spawn from spawner blocks in peaceful mode even when custom_spawn_rules is specified
Observed result
The spawner only works if custom_spawn_rules is not present
With the
/setblock ~ ~ ~ spawner{SpawnData:{entity:{id:"mob"}},MaxSpawnDelay:0s,MinSpawnDelay:0s}command, piglins always fail to spawn, no matter the difficulty.