mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Add a nil check in mcl_dripping to deal with deleted blocks
This commit is contained in:
parent
30eecae708
commit
cebd37cb00
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ local function register_drop(liquid, glow, sound, nodes, interval, chance)
|
||||||
--with longer abm cycles
|
--with longer abm cycles
|
||||||
table.shuffle(nn)
|
table.shuffle(nn)
|
||||||
for i=1,math.random(#nn) do
|
for i=1,math.random(#nn) do
|
||||||
if minetest.get_item_group(minetest.get_node(vector.offset(nn[i], 0, 1, 0)).name, liquid) ~= 0
|
if nn[i] and minetest.get_item_group(minetest.get_node(vector.offset(nn[i], 0, 1, 0)).name, liquid) ~= 0
|
||||||
and minetest.get_node(vector.offset(nn[i], 0, -1, 0)).name == "air" then
|
and minetest.get_node(vector.offset(nn[i], 0, -1, 0)).name == "air" then
|
||||||
make_drop(nn[i],liquid,sound,interval)
|
make_drop(nn[i],liquid,sound,interval)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue