Hostile mobs can spawn on blocks occupied by a door or trapdoor when the light level is 7 or lower.
This is a bug because doors are redstone components and mobs should not spawn on redstone components.
Steps to Reproduce:
- Summon a large platform of both doors and trapdoors.
/fill ~1 ~ ~1 ~30 ~ ~30 minecraft:polished_andesite
/fill ~1 ~1 ~1 ~30 ~1 ~15 minecraft:oak_door[half=lower,open=true]
/fill ~1 ~2 ~1 ~30 ~2 ~15 minecraft:oak_door[half=upper,open=true]
/fill ~1 ~1 ~16 ~30 ~1 ~30 minecraft:oak_trapdoor[half=bottom,open=true]
- Ensure that the "doMobSpawning" gamerule is set to "true".
- Set the time to "midnight" and wait around ten seconds to allow hostile mobs to spawn.
- If no hostile mobs spawned within the doors or trapdoors after this time, kill all non-player entities by using the following command to repeat the spawning process of hostile mobs once again.
/kill @e[type=!minecraft:player]
- Take note as to whether or not mobs can spawn within doors and trapdoors.