Preventing Iron golems from spawning outside the spawner platform?

I managed to build an Iron golem farm in survival vanilla (1.9). later I realised that golems were spawning outside of the spawning platform. see images below to get the scenario.

enter image description here

enter image description here

For temporary I use suffocation method to kill them and obtain iron. enter image description here

however soon I plan to prevent them from spawning outside the platform because it is written on wikienter image description here

But what can I do to prevent them from spawning?

First I thought of placing half slabs everywhere.(Here I don't know what should be spacing between slabs)

The second thought was to dig the terrain aside the farm (But I don't know how many blocks deep)

EDIT : I decided to place half slabs. then added dark oak half slabs around the spawning platform. Still again golems were spawning outside the spawner. after few minecraft days, I saw a golem spawned inside a half slab. enter image description here

Now this leaves only one option digging around the spawner platforms. However I don't know how deep should I dig?.


Solution 1:

For a Golem to spawn, it needs 4 blocks of height before the next solid block, and 2 blocks of horizontal space (Golems can spawn between blocks horizontally, so they may fit into 2-wide passage). Golem spawning is not impeded by half-slabs, other transparent blocks, or liquids, so you can't cover the floor with spaced half-slabs like it works with Spiders.

This leaves you with only two options:

  • Fill the entire volume of Golem spawning (which is 16x16x6 around village center) with solid block floors 3 blocks of air apart. You can also use walls 1 meter apart, but floors are probably a bit prettier :-)
  • You can leave the bottommost floor 4 levels below level of your doors, and keep air up from there.

Did I already tell Golems can spawn in transparent blocks? :-)

Golem in Glass