I had this happen in Bedrock. Iron farm with 20 villagers in a 5x5 area completely closed off, no way in or out. Jack o lantern in the middle of the 5x5. Had no problem for days, then while I was in the vicinity digging a tunnel for a new railline, they turned into zombies.
Is it possible that the edge of the 5x5 was in the radius for monsters to spawn but the lightsource wasn't? So while I was digging the railline, the edge of the 5x5 was within mob spawn radius, but the light in the middle wasn't, and the system saw that edge as being unlit?
I had this happen in Bedrock. Iron farm with 20 villagers in a 5x5 area completely closed off, no way in or out. Jack o lantern in the middle of the 5x5. Had no problem for days, then while I was in the vicinity digging a tunnel for a new railline, they turned into zombies.
Is it possible that the edge of the 5x5 was in the radius for monsters to spawn but the lightsource wasn't? So while I was digging the railline, the edge of the 5x5 was within mob spawn radius, but the light in the middle wasn't, and the system saw that edge as being unlit?