Turn off village iron golem spawn?

Da
5

I'm building a city in Minecraft and have chosen villagers as residents of the city. Since iron golems spawn with a certain number of villagers and doors, I would like to know whether this could be prevented by settings (/ gamerule) or command blocks.

Ge

I think plugins make it easy. I don't know if it works with commands 🤷♂️

Hu

And tip: we're in 1.16, it doesn't depend on the doors anymore. It depends on how many beds there are in the village, whether several villagers are threatened by zombies or whether villagers want a golem

Pr

With a Forever Command Block and the command "/ kill @e [type = iron_golem]
But that just kills them instead of preventing spawning

Da

Thanks

Da

Thank you very much