add spawn functions to some trees that didn't have them

This commit is contained in:
FaceDeer
2022-07-13 22:01:50 -06:00
parent c3e3ea0d5d
commit 4884f1e51a
4 changed files with 36 additions and 26 deletions

View File

@ -124,7 +124,6 @@ minetest.register_node("df_primordial_items:jungle_mushroom_sapling", {
if df_farming and df_farming.kill_if_sunlit(pos) then
return
end
minetest.set_node(pos, {name="air"})
df_primordial_items.spawn_jungle_mushroom(pos)
end,
})
@ -135,6 +134,7 @@ local c_cap_2 = minetest.get_content_id("df_primordial_items:jungle_mushroom_cap
local c_air = minetest.get_content_id("air")
df_primordial_items.spawn_jungle_mushroom = function(pos)
minetest.set_node(pos, {name="air"})
local x, y, z = pos.x, pos.y, pos.z
local stem_height = math.random(1,3)
local cap_radius = math.random(2,3)