tweak slime mold spread and slime block recipe

This commit is contained in:
tenplus1 2024-09-23 08:21:30 +01:00
parent d1a60ebd7f
commit b17e6b561b

View File

@ -308,7 +308,7 @@ minetest.register_node("ethereal:slime_mold", {
buildable_to = true, buildable_to = true,
floodable = true, floodable = true,
drop = {}, drop = {},
groups = {crumbly = 3, flammable = 1, attached_node = 1}, groups = {crumbly = 3, attached_node = 1},
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
selection_box = { selection_box = {
type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
@ -320,20 +320,29 @@ minetest.register_node("ethereal:slime_mold", {
minetest.register_abm({ minetest.register_abm({
label = "Slime mold spread", label = "Slime mold spread",
nodenames = {"ethereal:slime_mold"}, nodenames = {"ethereal:slime_mold"},
neighbors = {"ethereal:spore_grass"}, neighbors = {"ethereal:spore_grass", "ethereal:fire_flower"},
interval = 15, interval = 15,
chance = 4, chance = 4,
catch_up = false, catch_up = false,
action = function(pos, node) action = function(pos, node)
if minetest.find_node_near(pos, 1, {"ethereal:fire_flower"}) then
minetest.sound_play("fire_extinguish_flame",
{pos = pos, gain = 0.2, max_hear_distance = 5}, true)
minetest.remove_node(pos) ; return
end
local near = minetest.find_node_near(pos, 1, {"ethereal:spore_grass"}) local near = minetest.find_node_near(pos, 1, {"ethereal:spore_grass"})
if near then if near then
minetest.swap_node(near, {name = "ethereal:slime_mold"}) minetest.sound_play("default_gravel_dug",
{pos = near, gain = 0.5, max_hear_distance = 5}, true)
minetest.sound_play("default_gravel_dug", {pos = pos, gain = 0.5}, true) minetest.set_node(near, {name = "ethereal:slime_mold"})
end end
end end
}) })
@ -352,7 +361,7 @@ minetest.register_craft({
output = "ethereal:slime_block", output = "ethereal:slime_block",
recipe = { recipe = {
{"ethereal:slime_mold", "ethereal:slime_mold", "ethereal:slime_mold"}, {"ethereal:slime_mold", "ethereal:slime_mold", "ethereal:slime_mold"},
{"ethereal:slime_mold", "ethereal:slime_mold", "ethereal:slime_mold"}, {"ethereal:slime_mold", "ethereal:fire_dust", "ethereal:slime_mold"},
{"ethereal:slime_mold", "ethereal:slime_mold", "ethereal:slime_mold"} {"ethereal:slime_mold", "ethereal:slime_mold", "ethereal:slime_mold"}
} }
}) })