From 48d6a2fd7253e00baa2d9839f2147c59e729a201 Mon Sep 17 00:00:00 2001 From: cora Date: Wed, 2 Nov 2022 13:03:29 +0100 Subject: [PATCH] Add some ABM limits for lava ABMs --- mods/ITEMS/mcl_blackstone/init.lua | 3 +++ mods/ITEMS/mcl_core/functions.lua | 3 ++- mods/ITEMS/mcl_crimson/init.lua | 2 +- mods/ITEMS/mcl_fire/init.lua | 6 +++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 99d168b15..00b9819f8 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -196,12 +196,14 @@ mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blac mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone") --lavacooling + minetest.register_abm({ label = "Lava cooling (basalt)", nodenames = {"group:lava"}, neighbors = {"mcl_core:ice"}, interval = 1, chance = 1, + min_y = mcl_vars.mg_end_min, action = function(pos, node, active_object_count, active_object_count_wider) local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "mcl_core:ice") local lavatype = minetest.registered_nodes[node.name].liquidtype @@ -225,6 +227,7 @@ minetest.register_abm({ neighbors = {"mcl_core:packed_ice"}, interval = 1, chance = 1, + min_y = mcl_vars.mg_end_min, action = function(pos, node, active_object_count, active_object_count_wider) local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "mcl_core:packed_ice") local lavatype = minetest.registered_nodes[node.name].liquidtype diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index f5132d74b..5a01cd8c1 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -22,6 +22,7 @@ minetest.register_abm({ neighbors = {"group:water"}, interval = 1, chance = 1, + min_y = mcl_vars.mg_end_min, action = function(pos, node, active_object_count, active_object_count_wider) local water = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+1, z=pos.z+1}, "group:water") @@ -174,7 +175,7 @@ minetest.register_abm({ nodenames = {"group:destroy_by_lava_flow"}, neighbors = {"group:lava"}, interval = 1, - chance = 1, + chance = 5, action = function(pos, node, active_object_count, active_object_count_wider) liquid_flow_action(pos, "lava", function(pos) minetest.remove_node(pos) diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index b225ab142..255295aba 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -236,7 +236,7 @@ minetest.register_node("mcl_crimson:warped_wart_block", { minetest.register_node("mcl_crimson:shroomlight", { description = S("Shroomlight"), tiles = {"shroomlight.png"}, - groups = {handy = 1, hoe = 7, swordy = 1, leafdecay = 5, leaves = 1, deco_block = 1}, + groups = {handy = 1, hoe = 7, swordy = 1, deco_block = 1}, light_source = minetest.LIGHT_MAX, _mcl_hardness = 2, }) diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 79b46a701..8827b9f9a 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -378,9 +378,9 @@ else -- Fire enabled minetest.register_abm({ label = "Ignite fire by lava", nodenames = {"mcl_core:lava_source","mcl_nether:nether_lava_source"}, - neighbors = {"air","group:flammable"}, - interval = 7, - chance = 3, + neighbors = {"group:flammable"}, + interval = 15, + chance = 9, catch_up = false, action = function(pos) local p=get_ignitable_by_lava(pos)