diff --git a/mods/ENTITIES/pyutest_lightning/init.lua b/mods/ENTITIES/pyutest_lightning/init.lua index 41e9afc..5e35c52 100644 --- a/mods/ENTITIES/pyutest_lightning/init.lua +++ b/mods/ENTITIES/pyutest_lightning/init.lua @@ -45,7 +45,9 @@ PyuTest.lightning_strike = function(pos, radius, size) if y_pos then local npos = vector.new(pos.x + x, y_pos, pos.z +z) - if math.random(1, 6) == 1 then + local b = core.get_node(npos).name == "air" + local b2 = core.get_node(npos - vector.new(0, 1, 0)).name ~= "air" + if math.random(1, 6) == 1 and b and b2 then core.set_node(npos, {name = "pyutest_blocks:fire"}) end end