4

I am building an iron golem farm in the spawn chunks, and there is the problem of witches spawning in the villager cells, and that would break the iron golem farm. Bummer.

So, reading the wiki, I learned that

When lightning is to strike, random X and Z coordinates within the chunk are chosen, and the block just above the highest block that is liquid or blocks movement is chosen for the lightning strike. Then if there are any living entities that can see the sky in a 3×3×h region from 3 below the target block up to the world height, one such entity is selected at random and the lightning target is moved to the block the entity is standing in.

The target block is checked again for the following conditions:

  • Target block can see sky.
  • Rain (not snow) is falling in the target block.

If these conditions pass, lightning strikes.

When lightning strikes, all entities within a 6×6×12 region horizontally centered on the northwest corner of the target block with the bottom edge 3 below the target block are struck by lightning.

So basically if I put a roof over the villager cell, they should be safe, but I think that x12 on the last paragraph is height. Also it only targets entities if they can see the sky.

How should I build the roof to protect the villagers? How broad and how far high over them?

Related questions, none of the answers solve my particular issue, as I only need to protect the 4x4 area where the villagers will stand in.

(asks about fire-proofing buildings) How to lightning-proof a structure?

(asks about protecting the player) Preventing Lightning in Minecraft

(also about buildings) How can Buildings be Made Fireproof?

4

Based on the information on the wiki, a roof 3 blocks above the villagers, and covering them plus 3 blocks in all directions around them should be enough to prevent lightning from damaging them, as lightning will not be able to target blocks with an overhang, and the overhang is far enough that even if lightning strikes directly next to it, the villagers will be out of range of the damage.

  • "[...] with the bottom edge 3 below the target block are struck by lightning." 3 blocks between the villagers and the roof is enough, and probably aesthetically more pleasing than 12. – MrLemon Nov 5 '15 at 21:55
  • @MrLemon indeed a 3 block gap between the head of the villagers and the beginning of the roof is enough. None the less, this one gets the green check. – Mindwin Feb 17 '16 at 16:23
-1

First you must create a very fast redstone clock and make power a command block with this command inside:

/kill @e[type=Lightning]

This will kill lightning before it can strike because in the 1.8 update lightning became an entity and also allow you to use entity commands using @e or entitydata but the clock must be very fast as lightning takes about 2 game ticks to hit the surface.
The best option is by using one of the fastest and simplest command block clocks To set up the clock you must first set up a command block type in

/setblock ~ 1~ ~ redstone_block 0 destroy

Then place a block of stone on top of the command block then on the top of the stone place another command block with this command inside:

/kill @e[type=Item,r=2]

Warning:do not take out the r=2 or all items will be deleted constantly.(r=radius) Now replace the stone with a redstone block finally place the kill lightning command block beside the redstone block now you are complete.

  • This is so profoundly not a survival suggestion. – Wormbo Dec 18 '18 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.