From c328f05de4a0a03b247f93e116abc888cd53105d Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 23 Feb 2020 12:01:38 -0700 Subject: [PATCH] shut down gas seeps that are close to lava to reduce endless explosions --- mine_gas/init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mine_gas/init.lua b/mine_gas/init.lua index 0717708..4129e3a 100644 --- a/mine_gas/init.lua +++ b/mine_gas/init.lua @@ -172,6 +172,20 @@ local orthogonal = { {x=-1,y=0,z=0}, } +minetest.register_lbm({ + label = "shut down gas seeps near lava", + name = "mine_gas:shut_down_lava_adjacent", + nodenames = {"mine_gas:gas_seep"}, + run_at_every_load = true, + action = function(pos, node) + minetest.after(math.random()*60, function() + if minetest.find_node_near(pos, 30, "group:lava") then + minetest.set_node(pos, {name="default:stone_with_coal"}) + end + end) + end, +}) + minetest.register_abm({ label = "mine_gas:gas seep", nodenames = {"mine_gas:gas_seep"},