How can you lock an iron golem in an area, but so that players (and mobs) can go in and out, but the golem can't?
How does it work, or does it not work at all?
I thank you in advance for good answers!
Normal wooden or iron door. Only villagers / players and mobs fit through.
OK!
Maybe I misunderstood the question, but maybe just build an enclosure by leaving two free from the ground so that players and mobs can go through because they are usually not larger than two blocks. The iron golems should be higher than two blocks, right?
Tie the golem to a fence with a line