summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-05-09 20:32:22 -0500
committercheapie <no-email-for-you@example.com>2024-05-09 20:32:22 -0500
commitb6d08e6997adc71bdf50505cffe0d00495a3cdaa (patch)
treebf37dd646d7c7ea0e32258db309af770fa83f6dd
parentb18fa482b5dba5dc2ea48df7bb1202a80e587e91 (diff)
downloadtechage_db_compat-main.tar
techage_db_compat-main.tar.gz
techage_db_compat-main.tar.bz2
techage_db_compat-main.tar.xz
techage_db_compat-main.zip
Fix lava cooling crashHEADmain
-rw-r--r--init.lua9
1 files changed, 9 insertions, 0 deletions
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")