Fix bonemealing of large fungi

This commit is contained in:
cora 2022-09-19 14:19:49 +02:00
parent f9372b02f6
commit 05e6afb93a

@ -55,9 +55,12 @@ local function spread_nether_plants(pos,node)
table.shuffle(nn) table.shuffle(nn)
nn[1] = pos nn[1] = pos
for i=1,math.random(1,math.min(#nn,12)) do for i=1,math.random(1,math.min(#nn,12)) do
minetest.set_node(vector.offset(nn[i],0,1,0),{name=nether_plants[n][math.random(#nether_plants[n])]}) local p = vector.offset(nn[i],0,1,0)
if minetest.get_node(p).name == "air" then
minetest.set_node(p,{name=nether_plants[n][math.random(#nether_plants[n])]})
mcl_dye.add_bone_meal_particle(vector.offset(nn[i],0,1,0)) mcl_dye.add_bone_meal_particle(vector.offset(nn[i],0,1,0))
end end
end
end end
minetest.register_node("mcl_crimson:warped_fungus", { minetest.register_node("mcl_crimson:warped_fungus", {
@ -82,6 +85,7 @@ minetest.register_node("mcl_crimson:warped_fungus", {
if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5) local random = math.random(1, 5)
if random == 1 then if random == 1 then
minetest.remove_node(pos)
generate_warped_tree(pos) generate_warped_tree(pos)
end end
end end
@ -382,6 +386,7 @@ minetest.register_node("mcl_crimson:crimson_fungus", {
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
local random = math.random(1, 5) local random = math.random(1, 5)
if random == 1 then if random == 1 then
minetest.remove_node(pos)
generate_crimson_tree(pos) generate_crimson_tree(pos)
end end
end end