From d80cfb4a7f37758ef2ee0c75336028baac922677 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 20 Jan 2013 14:43:18 -0500 Subject: [PATCH] Made surface-based sapling growth depend on surface value in each tree's biome --- init.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 5d44872..a7b9491 100644 --- a/init.lua +++ b/init.lua @@ -61,19 +61,15 @@ plantslib:register_generate_plant(moretrees.beech_biome, moretrees.beech_model) -- sapling growth setup -local sapling_interval = 500 -local sapling_chance = 10 +local sapling_interval = 1 +local sapling_chance = 1 for i in ipairs(simple_trees) do local tree_name = trees[i][1] local tree_model = tree_name.."_model" - dbg(dump(moretrees[tree_model])) + local tree_biome = tree_name.."_biome" - if tree_model == "palm_model" then - grow_nodes = {"default:sand"} - else - grow_nodes = {"default:dirt_with_grass"} - end + plantslib:dbg(dump(moretrees[tree_biome].surface)) plantslib:grow_plants( sapling_interval, @@ -81,7 +77,7 @@ for i in ipairs(simple_trees) do "moretrees:"..tree_name.."_sapling", nil, nil, - grow_nodes, + moretrees[tree_biome].surface, nil, nil, nil, -- 2.30.2