From 57ac061f6744cd03ff382daeb8e363662966e1ae Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 2 Feb 2021 10:48:32 +0000 Subject: [PATCH] added small redwood and sapling check for growing --- README.md | 1 + sapling.lua | 6 +- schematics/redwood_small_tree.lua | 219 ++++++++++++++++++++++++++++++ schems.lua | 1 + 4 files changed, 226 insertions(+), 1 deletion(-) create mode 100644 schematics/redwood_small_tree.lua diff --git a/README.md b/README.md index e202c7b..2eb233f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Ethereal Mapgen mod for Minetest (works on all except v6) - Added Candied Lemon and Olive Oil items and recipe - Rewrite stairs and add auto-select function - Added Lemonade + - Added smaller redwood trees, to grow large variety 2 saplings required ### 1.27 diff --git a/sapling.lua b/sapling.lua index 8bee1d6..ae58cda 100644 --- a/sapling.lua +++ b/sapling.lua @@ -116,7 +116,11 @@ function ethereal.grow_willow_tree(pos) end function ethereal.grow_redwood_tree(pos) - add_tree(pos, 7, 0, 7, ethereal.redwood_tree) + if minetest.find_node_near(pos, 1, "ethereal:redwood_sapling") then + add_tree(pos, 7, 0, 7, ethereal.redwood_tree) + else + add_tree(pos, 4, 0, 4, ethereal.redwood_small_tree) + end end function ethereal.grow_orange_tree(pos) diff --git a/schematics/redwood_small_tree.lua b/schematics/redwood_small_tree.lua new file mode 100644 index 0000000..fb50700 --- /dev/null +++ b/schematics/redwood_small_tree.lua @@ -0,0 +1,219 @@ + +local _ = {name = "air", prob = 0} +local T = {name = "ethereal:redwood_trunk", prob = 255} +local L = {name = "ethereal:redwood_leaves", prob = 255} + +ethereal.redwood_small_tree = { + + size = {x = 9, y = 21, z = 9}, + + yslice_prob = { + {ypos = 0, prob = 127}, + {ypos = 1, prob = 127}, + {ypos = 2, prob = 127}, + {ypos = 3, prob = 127}, + {ypos = 4, prob = 127}, + }, + + data = { + +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_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_,_,_,L,L,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, + +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +L,L,L,_,_,_,_,_,_, +_,_,_,_,L,L,L,L,L, +_,_,_,_,_,_,L,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,L,L,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, +_,_,_,_,_,_,_,_,_, + + } +} diff --git a/schems.lua b/schems.lua index 5221004..f07bccb 100644 --- a/schems.lua +++ b/schems.lua @@ -20,6 +20,7 @@ dofile(path .. "mushroomone.lua") dofile(path .. "willow.lua") dofile(path .. "bigtree.lua") dofile(path .. "redwood_tree.lua") +dofile(path .. "redwood_small_tree.lua") dofile(path .. "vinetree.lua") dofile(path .. "sakura.lua") dofile(path .. "igloo.lua")