From b6d08e6997adc71bdf50505cffe0d00495a3cdaa Mon Sep 17 00:00:00 2001 From: cheapie Date: Thu, 9 May 2024 20:32:22 -0500 Subject: Fix lava cooling crash --- init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.lua b/init.lua index fac7378..e0a2f19 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,15 @@ if minetest.setting_getbool("gloopblocks_lavacooling") ~= false then --This part comes directly from gloopblocks, just running it here again in case techage changed it --(it may or may not depending on load order) + local gloopblocks_search_nearby_nodes = function(pos, node) + if minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end + return false + end default.cool_lava = function(pos, node) if node.name == "default:lava_source" then if gloopblocks_search_nearby_nodes(pos,"default:water_source") -- cgit v1.2.3