1
0
Fork 0

Add some ABM limits for lava ABMs

This commit is contained in:
cora 2022-11-02 13:03:29 +01:00
parent e9e76d2c1e
commit 48d6a2fd72
4 changed files with 9 additions and 5 deletions

View File

@ -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") mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
--lavacooling --lavacooling
minetest.register_abm({ minetest.register_abm({
label = "Lava cooling (basalt)", label = "Lava cooling (basalt)",
nodenames = {"group:lava"}, nodenames = {"group:lava"},
neighbors = {"mcl_core:ice"}, neighbors = {"mcl_core:ice"},
interval = 1, interval = 1,
chance = 1, chance = 1,
min_y = mcl_vars.mg_end_min,
action = function(pos, node, active_object_count, active_object_count_wider) 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 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 local lavatype = minetest.registered_nodes[node.name].liquidtype
@ -225,6 +227,7 @@ minetest.register_abm({
neighbors = {"mcl_core:packed_ice"}, neighbors = {"mcl_core:packed_ice"},
interval = 1, interval = 1,
chance = 1, chance = 1,
min_y = mcl_vars.mg_end_min,
action = function(pos, node, active_object_count, active_object_count_wider) 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 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 local lavatype = minetest.registered_nodes[node.name].liquidtype

View File

@ -22,6 +22,7 @@ minetest.register_abm({
neighbors = {"group:water"}, neighbors = {"group:water"},
interval = 1, interval = 1,
chance = 1, chance = 1,
min_y = mcl_vars.mg_end_min,
action = function(pos, node, active_object_count, active_object_count_wider) 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") 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"}, nodenames = {"group:destroy_by_lava_flow"},
neighbors = {"group:lava"}, neighbors = {"group:lava"},
interval = 1, interval = 1,
chance = 1, chance = 5,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
liquid_flow_action(pos, "lava", function(pos) liquid_flow_action(pos, "lava", function(pos)
minetest.remove_node(pos) minetest.remove_node(pos)

View File

@ -236,7 +236,7 @@ minetest.register_node("mcl_crimson:warped_wart_block", {
minetest.register_node("mcl_crimson:shroomlight", { minetest.register_node("mcl_crimson:shroomlight", {
description = S("Shroomlight"), description = S("Shroomlight"),
tiles = {"shroomlight.png"}, 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, light_source = minetest.LIGHT_MAX,
_mcl_hardness = 2, _mcl_hardness = 2,
}) })

View File

@ -378,9 +378,9 @@ else -- Fire enabled
minetest.register_abm({ minetest.register_abm({
label = "Ignite fire by lava", label = "Ignite fire by lava",
nodenames = {"mcl_core:lava_source","mcl_nether:nether_lava_source"}, nodenames = {"mcl_core:lava_source","mcl_nether:nether_lava_source"},
neighbors = {"air","group:flammable"}, neighbors = {"group:flammable"},
interval = 7, interval = 15,
chance = 3, chance = 9,
catch_up = false, catch_up = false,
action = function(pos) action = function(pos)
local p=get_ignitable_by_lava(pos) local p=get_ignitable_by_lava(pos)