Considering the pretty common design (20x20 base) for the iron golem farms. What the minimum distance from one golem farm to another to make them work correctly? And how does this "distance" behaves when calculated diagonally?
The centers are 63.639 blocks apart (from vector [0, 0, 0] to vector [45, 0, 45] as [x, y, z]) and they are read as two separate village.
There is a good write up on Village mechanics on the Minecraft Wiki. For two villages to be safely treated as separate villages, they need to be greater than radius + 32 blocks away from each other.
Not that the radius is defined as:
- The distance from the center point to the furthest door, -OR-
- 32 blocks
whichever is greater. This means that the radius is always at least 32, no matter what, but it can be more than that if there are any houses further than 32 blocks from the center
So, if your Iron Golem farms are 20x20, and the center of the village is slap bang in the middle of that, then your radius is a further 10 blocks from one side of the farm, (i.e. 30 blocks). However, 30 < 32, so we take radius=32
radius + 32 = (32) + 32 = 64 blocks.
If you are working a lot with villages/golem farms, you might find this mod handy: Village Info Mod. It will help calculate how far you are from the village center, and other useful info.
Robotnik gives some quite advanced calculations but the simple answer is a door will generate a new village if it's registered more than 64 blocks (euclidean) away from the nearest registered door of an existing village.
After a new village is registered, another door can be registered belonging to it, lying even adjacent to previous door, making the villages overlap and their centers to be a block apart, but unless you want to perform mind-boggling wizardry like the Iron Trench to force order of registering doors, just make sure there is at least 64 blocks gap between doors of one farm and doors of the other.
On The Wiki It Says it's 66 Blocks minium distance.
Tango Tek stated the distance formula and said all calculations suggest a min. distance of 150 blocks of distance between the iron farm and any villages and a distance of 100 blocks between two iron farms. this is to keep the golems spawning in the farms and not inbetween them.....I have used his calculations on my own world and find them to be accurate as between my two farms I am cranking out 3500 - 5000 iron in an hour. both my farms drop into a killing chamber lined with hoppers the iron is transported to the automatic storage and the poppies are shot into a nether portal. the valid distance between 2 villages is 68.5 blocks or 69 since half blocks dont stack sideways.
In an Iron Golem farming tutorial, for maximum yield it prescribed a 256 block separation. This tutorial was by docm and located on youtube:
The 256 block gap is not required; it just provides maximum yield.