Improve lightning fire creation
This commit is contained in:
parent
6f7a75ab23
commit
8184d5803c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user