Minecraft lightning strike inside building

minecraft-java-edition

I know you can get struck by lightning in Minecraft, but is it possible to get struck while you're inside your base?

During a thunderstorm I went inside my base where I had a bunch of my animals such as my tamed cats and dogs. My base wasn't quite finished yet and there was a hole in the ceiling on the one side where I hadn't finished building yet so I could still see the rain and the lightning from inside my base. Suddenly I heard one of my cats sheik and make a sound like it was dying and when I turned it was gone.

The cat that died was in the opposite side of the base than where the whole in the ceiling was so it wasn't anywhere near it but it was sitting right next to the wall, so I had wondered if the lightning had struck it through the wall. I know sometimes if an animal is right up against a block you can see its head poking out from the other side so I just wanted to know if it was possible for an animal to get struck my lightning from inside.

Best Answer

Lightning can and does affect entities through walls in an Area-Of-Effect style of causing damage. All entities within a 6x6x12 cuboid of the strike will take 5 HP of damage.

As long as your base is above ground and not in a "dry" biome (such as a mesa), you can be struck by lightning -- regardless of holes in your ceiling.

To avoid lightning strikes, either build your base underground or in such a place where lightning doesn't strike normally at all.

(source)