mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Fix bonemealing of large fungi
This commit is contained in:
parent
f9372b02f6
commit
05e6afb93a
1 changed files with 7 additions and 2 deletions
|
@ -55,10 +55,13 @@ 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", {
|
||||||
description = S("Warped Fungus Mushroom"),
|
description = S("Warped Fungus Mushroom"),
|
||||||
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue