diff --git a/cloudlands.lua b/cloudlands.lua index 9baeba7..352e9d0 100644 --- a/cloudlands.lua +++ b/cloudlands.lua @@ -1,5 +1,6 @@ local DEBUG = false -- dev logging local DEBUG_GEOMETRIC = false -- turn off noise from island shapes +local DEBUG_SKYTREES = false -- dev logging local LOWLAND_BIOMES = false -- If true then determine an island's biome using the biome at altitude "LOWLAND_BIOME_ALTITUDE" local LOWLAND_BIOME_ALTITUDE = 10 -- Higher than beaches, lower than mountains (See LOWLAND_BIOMES) local ALTITUDE = 200 -- average altitude of islands @@ -263,7 +264,8 @@ end; -- If splitting SkyTrees into a seperate mod, perhaps schemlib would be of help - https://forum.minetest.net/viewtopic.php?t=18084 -if SkyTrees == nil then -- If SkyTrees added into other mods, this may have already been defined + +if not minetest.global_exists("SkyTrees") then -- If SkyTrees added into other mods, this may have already been defined local TREE1_FILE = 'cloudlands_tree1.mts' local TREE2_FILE = 'cloudlands_tree2.mts' @@ -277,12 +279,12 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre { filename = TREE1_FILE, size = {x = 81, y = 106, z = 111}, - center = {x = 49, y = 11, z = 67}, + center = {x = 37, y = 11, z = 73}, requiredIslandDepth = 20, requiredIslandRadius = 40, nodesWithConstructor = { - {x=35, y=69, z=1}, {x=61, y=51, z=2}, {x=36, y=68, z=2}, {x=68, y=48, z=3}, {x=61, y=50, z=4}, {x=71, y=50, z=5}, {x=58, y=52, z=5}, {x=65, y=50, z=9}, {x=72, y=53, z=11}, {x=41, y=67, z=12}, {x=63, y=48, z=13}, {x=69, y=52, z=13}, {x=33, y=66, z=14}, {x=39, y=68, z=15}, {x=72, y=68, z=15}, {x=40, y=67, z=16}, {x=39, y=66, z=17}, {x=68, y=45, z=19}, {x=69, y=44, z=20}, {x=72, y=55, z=20}, {x=66, y=56, z=20}, {x=58, y=66, z=20}, {x=71, y=58, z=21}, {x=68, y=45, z=22}, {x=70, y=51, z=22}, {x=73, y=55, z=22}, {x=36, y=62, z=22}, {x=70, y=67, z=22}, {x=21, y=65, z=23}, {x=22, y=66, z=23}, {x=53, y=66, z=23}, {x=70, y=68, z=23}, {x=73, y=54, z=24}, {x=75, y=57, z=24}, {x=37, y=63, z=24}, {x=7, y=68, z=24}, {x=69, y=56, z=25}, {x=34, y=58, z=25}, {x=66, y=62, z=25}, {x=64, y=66, z=25}, {x=6, y=67, z=25}, {x=3, y=68, z=25}, {x=68, y=56, z=26}, {x=65, y=57, z=26}, {x=61, y=63, z=26}, {x=31, y=59, z=27}, {x=48, y=62, z=27}, {x=50, y=63, z=27}, {x=78, y=65, z=27}, {x=78, y=52, z=28}, {x=68, y=57, z=28}, {x=76, y=57, z=28}, {x=31, y=60, z=28}, {x=15, y=63, z=28}, {x=16, y=63, z=28}, {x=61, y=64, z=28}, {x=55, y=65, z=28}, {x=25, y=76, z=28}, {x=61, y=76, z=28}, {x=78, y=52, z=29}, {x=77, y=57, z=29}, {x=78, y=57, z=29}, {x=64, y=59, z=29}, {x=31, y=60, z=29}, {x=46, y=65, z=29}, {x=72, y=55, z=30}, {x=70, y=57, z=30}, {x=79, y=59, z=30}, {x=77, y=60, z=30}, {x=17, y=63, z=30}, {x=58, y=63, z=30}, {x=65, y=63, z=30}, {x=36, y=64, z=30}, {x=44, y=65, z=30}, {x=46, y=66, z=30}, {x=30, y=75, z=30}, {x=58, y=76, z=30}, {x=60, y=77, z=30}, {x=50, y=53, z=31}, {x=34, y=58, z=31}, {x=44, y=60, z=31}, {x=58, y=65, z=31}, {x=80, y=67, z=31}, {x=45, y=68, z=31}, {x=59, y=71, z=31}, {x=64, y=73, z=31}, {x=53, y=103, z=31}, {x=37, y=2, z=32}, {x=46, y=54, z=32}, {x=23, y=60, z=32}, {x=66, y=72, z=32}, {x=30, y=74, z=32}, {x=63, y=74, z=32}, {x=64, y=74, z=32}, {x=63, y=78, z=32}, {x=52, y=52, z=33}, {x=77, y=57, z=33}, {x=63, y=59, z=33}, {x=24, y=60, z=33}, {x=18, y=64, z=33}, {x=30, y=65, z=33}, {x=33, y=65, z=33}, {x=74, y=65, z=33}, {x=75, y=65, z=33}, {x=35, y=74, z=33}, {x=58, y=76, z=33}, {x=44, y=55, z=34}, {x=18, y=63, z=34}, {x=45, y=88, z=34}, {x=43, y=93, z=34}, {x=52, y=99, z=34}, {x=37, y=2, z=35}, {x=34, y=4, z=35}, {x=66, y=48, z=35}, {x=46, y=53, z=35}, {x=48, y=53, z=35}, {x=67, y=56, z=35}, {x=35, y=57, z=35}, {x=75, y=57, z=35}, {x=46, y=60, z=35}, {x=20, y=61, z=35}, {x=31, y=65, z=35}, {x=69, y=66, z=35}, {x=49, y=68, z=35}, {x=65, y=71, z=35}, {x=28, y=74, z=35}, {x=42, y=79, z=35}, {x=45, y=95, z=35}, {x=35, y=6, z=36}, {x=45, y=54, z=36}, {x=44, y=55, z=36}, {x=73, y=58, z=36}, {x=71, y=59, z=36}, {x=55, y=61, z=36}, {x=51, y=65, z=36}, {x=63, y=71, z=36}, {x=42, y=94, z=36}, {x=42, y=95, z=36}, {x=46, y=95, z=36}, {x=43, y=98, z=36}, {x=32, y=11, z=37}, {x=36, y=11, z=37}, {x=64, y=48, z=37}, {x=47, y=54, z=37}, {x=33, y=56, z=37}, {x=31, y=59, z=37}, {x=62, y=59, z=37}, {x=45, y=61, z=37}, {x=50, y=65, z=37}, {x=67, y=65, z=37}, {x=60, y=66, z=37}, {x=63, y=72, z=37}, {x=45, y=87, z=37}, {x=48, y=99, z=37}, {x=33, y=7, z=38}, {x=64, y=48, z=38}, {x=33, y=56, z=38}, {x=64, y=58, z=38}, {x=22, y=63, z=38}, {x=61, y=68, z=38}, {x=34, y=73, z=38}, {x=36, y=79, z=38}, {x=46, y=87, z=38}, {x=54, y=88, z=38}, {x=44, y=97, z=38}, {x=52, y=100, z=38}, {x=30, y=42, z=39}, {x=29, y=44, z=39}, {x=64, y=48, z=39}, {x=72, y=52, z=39}, {x=36, y=55, z=39}, {x=63, y=59, z=39}, {x=28, y=61, z=39}, {x=31, y=61, z=39}, {x=69, y=61, z=39}, {x=36, y=79, z=39}, {x=41, y=85, z=39}, {x=48, y=88, z=39}, {x=45, y=94, z=39}, {x=49, y=100, z=39}, {x=70, y=54, z=40}, {x=53, y=59, z=40}, {x=73, y=59, z=40}, {x=21, y=63, z=40}, {x=42, y=76, z=40}, {x=41, y=77, z=40}, {x=44, y=101, z=40}, {x=37, y=6, z=41}, {x=40, y=56, z=41}, {x=21, y=59, z=41}, {x=52, y=59, z=41}, {x=55, y=63, z=41}, {x=35, y=69, z=41}, {x=40, y=79, z=41}, {x=29, y=83, z=41}, {x=56, y=87, z=41}, {x=39, y=10, z=42}, {x=28, y=22, z=42}, {x=27, y=42, z=42}, {x=67, y=48, z=42}, {x=68, y=53, z=42}, {x=70, y=54, z=42}, {x=29, y=55, z=42}, {x=33, y=55, z=42}, {x=71, y=55, z=42}, {x=32, y=61, z=42}, {x=65, y=63, z=42}, {x=34, y=66, z=42}, {x=55, y=87, z=42}, {x=50, y=88, z=42}, {x=53, y=91, z=42}, {x=38, y=8, z=43}, {x=39, y=11, z=43}, {x=32, y=46, z=43}, {x=49, y=59, z=43}, {x=68, y=62, z=43}, {x=32, y=79, z=43}, {x=27, y=82, z=43}, {x=42, y=86, z=43}, {x=43, y=86, z=43}, {x=56, y=88, z=43}, {x=56, y=90, z=43}, {x=40, y=10, z=44}, {x=39, y=12, z=44}, {x=30, y=20, z=44}, {x=30, y=22, z=44}, {x=60, y=57, z=44}, {x=23, y=60, z=44}, {x=71, y=63, z=44}, {x=65, y=65, z=44}, {x=80, y=66, z=44}, {x=34, y=8, z=45}, {x=30, y=42, z=45}, {x=31, y=42, z=45}, {x=47, y=59, z=45}, {x=70, y=62, z=45}, {x=74, y=67, z=45}, {x=37, y=69, z=45}, {x=30, y=16, z=46}, {x=30, y=42, z=46}, {x=32, y=43, z=46}, {x=39, y=54, z=46}, {x=45, y=58, z=46}, {x=59, y=64, z=46}, {x=75, y=64, z=46}, {x=75, y=67, z=46}, {x=35, y=44, z=47}, {x=28, y=52, z=47}, {x=38, y=52, z=47}, {x=63, y=52, z=47}, {x=69, y=54, z=47}, {x=52, y=62, z=47}, {x=35, y=81, z=47}, {x=33, y=43, z=48}, {x=39, y=46, z=48}, {x=33, y=51, z=48}, {x=67, y=51, z=48}, {x=41, y=54, z=48}, {x=54, y=54, z=48}, {x=60, y=54, z=48}, {x=25, y=56, z=48}, {x=62, y=58, z=48}, {x=29, y=61, z=48}, {x=29, y=81, z=48}, {x=41, y=30, z=49}, {x=35, y=44, z=49}, {x=65, y=49, z=49}, {x=35, y=50, z=49}, {x=48, y=51, z=49}, {x=69, y=51, z=49}, {x=59, y=57, z=49}, {x=27, y=58, z=49}, {x=39, y=10, z=50}, {x=41, y=30, z=50}, {x=35, y=44, z=50}, {x=37, y=44, z=50}, {x=63, y=51, z=50}, {x=69, y=54, z=50}, {x=26, y=55, z=50}, {x=54, y=56, z=50}, {x=49, y=65, z=50}, {x=40, y=87, z=50}, {x=5, y=0, z=51}, {x=3, y=1, z=51}, {x=7, y=5, z=51}, {x=64, y=6, z=51}, {x=37, y=7, z=51}, {x=44, y=29, z=51}, {x=69, y=48, z=51}, {x=42, y=50, z=51}, {x=29, y=52, z=51}, {x=64, y=55, z=51}, {x=40, y=59, z=51}, {x=46, y=65, z=51}, {x=52, y=65, z=51}, {x=54, y=57, z=52}, {x=59, y=57, z=52}, {x=47, y=61, z=52}, {x=7, y=0, z=53}, {x=68, y=2, z=53}, {x=63, y=3, z=53}, {x=68, y=3, z=53}, {x=5, y=6, z=53}, {x=8, y=7, z=53}, {x=47, y=49, z=53}, {x=55, y=57, z=53}, {x=32, y=62, z=53}, {x=7, y=2, z=54}, {x=61, y=5, z=54}, {x=66, y=7, z=54}, {x=58, y=9, z=54}, {x=58, y=10, z=54}, {x=44, y=34, z=54}, {x=37, y=46, z=54}, {x=28, y=54, z=54}, {x=52, y=55, z=54}, {x=33, y=59, z=54}, {x=49, y=60, z=54}, {x=11, y=5, z=55}, {x=39, y=8, z=55}, {x=61, y=10, z=55}, {x=57, y=57, z=55}, {x=49, y=71, z=55}, {x=6, y=3, z=56}, {x=57, y=4, z=56}, {x=60, y=5, z=56}, {x=33, y=8, z=56}, {x=55, y=11, z=56}, {x=56, y=11, z=56}, {x=40, y=13, z=56}, {x=39, y=33, z=56}, {x=17, y=7, z=57}, {x=15, y=12, z=57}, {x=49, y=50, z=57}, {x=49, y=58, z=57}, {x=54, y=60, z=57}, {x=19, y=5, z=58}, {x=60, y=5, z=58}, {x=50, y=10, z=58}, {x=34, y=57, z=58}, {x=56, y=59, z=58}, {x=50, y=12, z=59}, {x=14, y=13, z=59}, {x=32, y=13, z=59}, {x=34, y=40, z=59}, {x=30, y=47, z=59}, {x=36, y=57, z=59}, {x=42, y=57, z=59}, {x=16, y=0, z=60}, {x=10, y=8, z=60}, {x=23, y=12, z=60}, {x=31, y=12, z=60}, {x=34, y=39, z=60}, {x=36, y=39, z=60}, {x=51, y=42, z=60}, {x=32, y=55, z=60}, {x=55, y=61, z=60}, {x=51, y=6, z=61}, {x=53, y=6, z=61}, {x=10, y=9, z=61}, {x=51, y=14, z=61}, {x=31, y=54, z=61}, {x=62, y=59, z=61}, {x=17, y=6, z=62}, {x=27, y=9, z=62}, {x=41, y=12, z=62}, {x=43, y=9, z=63}, {x=41, y=13, z=63}, {x=43, y=13, z=63}, {x=31, y=15, z=63}, {x=37, y=32, z=63}, {x=30, y=37, z=63}, {x=50, y=43, z=63}, {x=45, y=45, z=63}, {x=46, y=46, z=63}, {x=33, y=54, z=63}, {x=45, y=55, z=63}, {x=16, y=11, z=64}, {x=39, y=17, z=64}, {x=35, y=26, z=64}, {x=36, y=27, z=64}, {x=38, y=31, z=64}, {x=20, y=14, z=65}, - {x=40, y=17, z=65}, {x=32, y=26, z=65}, {x=30, y=32, z=65}, {x=41, y=36, z=65}, {x=29, y=37, z=65}, {x=28, y=40, z=65}, {x=44, y=40, z=65}, {x=47, y=40, z=65}, {x=52, y=9, z=66}, {x=18, y=11, z=66}, {x=26, y=17, z=66}, {x=28, y=40, z=66}, {x=32, y=52, z=66}, {x=22, y=7, z=67}, {x=28, y=7, z=67}, {x=22, y=15, z=67}, {x=28, y=39, z=67}, {x=49, y=44, z=67}, {x=37, y=8, z=68}, {x=27, y=22, z=68}, {x=45, y=47, z=68}, {x=29, y=7, z=69}, {x=47, y=8, z=69}, {x=43, y=21, z=69}, {x=48, y=43, z=69}, {x=42, y=49, z=69}, {x=32, y=60, z=69}, {x=35, y=60, z=69}, {x=37, y=9, z=70}, {x=48, y=11, z=70}, {x=24, y=17, z=70}, {x=26, y=22, z=70}, {x=27, y=37, z=70}, {x=33, y=59, z=70}, {x=30, y=62, z=70}, {x=33, y=8, z=71}, {x=45, y=9, z=71}, {x=47, y=10, z=71}, {x=46, y=11, z=71}, {x=47, y=12, z=71}, {x=44, y=24, z=71}, {x=27, y=29, z=71}, {x=43, y=39, z=71}, {x=47, y=41, z=71}, {x=31, y=45, z=71}, {x=39, y=58, z=71}, {x=44, y=23, z=72}, {x=26, y=29, z=72}, {x=28, y=36, z=72}, {x=36, y=52, z=72}, {x=35, y=1, z=73}, {x=34, y=2, z=74}, {x=42, y=7, z=74}, {x=27, y=8, z=74}, {x=23, y=10, z=74}, {x=46, y=15, z=74}, {x=26, y=16, z=74}, {x=35, y=45, z=74}, {x=42, y=57, z=74}, {x=24, y=8, z=75}, {x=21, y=9, z=75}, {x=44, y=22, z=75}, {x=33, y=42, z=75}, {x=36, y=47, z=75}, {x=20, y=9, z=76}, {x=45, y=18, z=76}, {x=43, y=29, z=76}, {x=38, y=47, z=76}, {x=36, y=51, z=76}, {x=21, y=7, z=77}, {x=18, y=9, z=77}, {x=18, y=10, z=77}, {x=28, y=29, z=77}, {x=30, y=34, z=77}, {x=47, y=16, z=78}, {x=44, y=20, z=78}, {x=29, y=31, z=78}, {x=31, y=35, z=78}, {x=38, y=52, z=78}, {x=42, y=60, z=78}, {x=29, y=7, z=79}, {x=34, y=7, z=79}, {x=45, y=7, z=79}, {x=18, y=8, z=79}, {x=54, y=11, z=79}, {x=45, y=17, z=79}, {x=46, y=32, z=79}, {x=37, y=7, z=80}, {x=52, y=8, z=80}, {x=54, y=9, z=80}, {x=12, y=11, z=80}, {x=30, y=13, z=80}, {x=33, y=13, z=80}, {x=32, y=14, z=80}, {x=32, y=15, z=80}, {x=44, y=17, z=80}, {x=25, y=19, z=80}, {x=27, y=22, z=80}, {x=28, y=23, z=80}, {x=40, y=27, z=80}, {x=33, y=31, z=80}, {x=50, y=7, z=81}, {x=16, y=14, z=81}, {x=44, y=15, z=81}, {x=41, y=21, z=81}, {x=35, y=30, z=81}, {x=38, y=7, z=82}, {x=55, y=8, z=82}, {x=27, y=9, z=82}, {x=41, y=10, z=82}, {x=31, y=16, z=82}, {x=42, y=17, z=82}, {x=39, y=58, z=82}, {x=36, y=6, z=83}, {x=32, y=10, z=83}, {x=39, y=19, z=83}, {x=32, y=23, z=83}, {x=34, y=23, z=83}, {x=35, y=24, z=83}, {x=35, y=26, z=83}, {x=43, y=63, z=83}, {x=51, y=7, z=84}, {x=60, y=9, z=84}, {x=60, y=10, z=84}, {x=43, y=11, z=84}, {x=59, y=11, z=84}, {x=43, y=12, z=84}, {x=20, y=14, z=84}, {x=34, y=7, z=85}, {x=51, y=8, z=85}, {x=7, y=9, z=85}, {x=22, y=10, z=85}, {x=31, y=11, z=85}, {x=49, y=12, z=85}, {x=42, y=13, z=85}, {x=55, y=14, z=85}, {x=30, y=15, z=85}, {x=56, y=7, z=86}, {x=13, y=8, z=86}, {x=7, y=10, z=86}, {x=22, y=10, z=86}, {x=10, y=5, z=87}, {x=12, y=6, z=87}, {x=35, y=6, z=87}, {x=5, y=8, z=87}, {x=6, y=10, z=87}, {x=53, y=10, z=87}, {x=61, y=12, z=87}, {x=41, y=60, z=87}, {x=60, y=4, z=88}, {x=4, y=5, z=88}, {x=35, y=6, z=88}, {x=36, y=6, z=88}, {x=65, y=7, z=88}, {x=13, y=10, z=88}, {x=38, y=5, z=89}, {x=36, y=6, z=89}, {x=56, y=9, z=89}, {x=19, y=11, z=89}, {x=32, y=12, z=89}, {x=45, y=62, z=89}, {x=41, y=68, z=89}, {x=4, y=2, z=90}, {x=60, y=2, z=90}, {x=11, y=3, z=90}, {x=36, y=6, z=90}, {x=57, y=9, z=90}, {x=43, y=59, z=90}, {x=62, y=2, z=91}, {x=10, y=3, z=91}, {x=62, y=10, z=91}, {x=44, y=59, z=91}, {x=20, y=8, z=92}, {x=32, y=12, z=92}, {x=44, y=61, z=92}, {x=43, y=68, z=92}, {x=36, y=1, z=93}, {x=64, y=6, z=93}, {x=35, y=7, z=93}, {x=63, y=7, z=93}, {x=64, y=7, z=93}, {x=19, y=9, z=93}, {x=40, y=12, z=93}, {x=68, y=2, z=94}, {x=65, y=6, z=94}, {x=35, y=8, z=94}, {x=39, y=13, z=94}, {x=38, y=1, z=95}, {x=42, y=2, z=95}, {x=38, y=58, z=95}, {x=39, y=58, z=95}, {x=39, y=1, z=96}, {x=35, y=14, z=96}, {x=40, y=10, z=100}, {x=33, y=12, z=100}, {x=38, y=3, z=104}, {x=38, y=8, z=106}, {x=37, y=2, z=107}, {x=35, y=4, z=108}, {x=39, y=2, z=110} + {x=35, y=69, z=1}, {x=61, y=51, z=2}, {x=36, y=68, z=2}, {x=68, y=48, z=3}, {x=61, y=50, z=4}, {x=71, y=50, z=5}, {x=58, y=52, z=5}, {x=65, y=50, z=9}, {x=72, y=53, z=11}, {x=41, y=67, z=12}, {x=63, y=48, z=13}, {x=69, y=52, z=13}, {x=33, y=66, z=14}, {x=39, y=68, z=15}, {x=72, y=68, z=15}, {x=40, y=67, z=16}, {x=39, y=66, z=17}, {x=68, y=45, z=19}, {x=69, y=44, z=20}, {x=72, y=55, z=20}, {x=66, y=56, z=20}, {x=58, y=66, z=20}, {x=71, y=58, z=21}, {x=68, y=45, z=22}, {x=70, y=51, z=22}, {x=73, y=55, z=22}, {x=36, y=62, z=22}, {x=70, y=67, z=22}, {x=21, y=65, z=23}, {x=22, y=66, z=23}, {x=53, y=66, z=23}, {x=70, y=68, z=23}, {x=73, y=54, z=24}, {x=75, y=57, z=24}, {x=37, y=63, z=24}, {x=7, y=68, z=24}, {x=69, y=56, z=25}, {x=34, y=58, z=25}, {x=66, y=62, z=25}, {x=64, y=66, z=25}, {x=6, y=67, z=25}, {x=3, y=68, z=25}, {x=68, y=56, z=26}, {x=65, y=57, z=26}, {x=61, y=63, z=26}, {x=31, y=59, z=27}, {x=48, y=62, z=27}, {x=50, y=63, z=27}, {x=78, y=65, z=27}, {x=78, y=52, z=28}, {x=68, y=57, z=28}, {x=76, y=57, z=28}, {x=31, y=60, z=28}, {x=15, y=63, z=28}, {x=16, y=63, z=28}, {x=66, y=64, z=28}, {x=60, y=65, z=28}, {x=61, y=76, z=28}, {x=63, y=76, z=28}, {x=69, y=59, z=29}, {x=51, y=65, z=29}, {x=72, y=57, z=30}, {x=20, y=60, z=30}, {x=21, y=61, z=30}, {x=49, y=65, z=30}, {x=52, y=53, z=31}, {x=72, y=57, z=31}, {x=36, y=58, z=31}, {x=63, y=60, z=31}, {x=54, y=63, z=31}, {x=45, y=65, z=31}, {x=79, y=66, z=31}, {x=62, y=70, z=31}, {x=55, y=103, z=31}, {x=52, y=53, z=32}, {x=68, y=60, z=32}, {x=19, y=61, z=32}, {x=53, y=63, z=32}, {x=37, y=64, z=32}, {x=21, y=65, z=32}, {x=56, y=65, z=32}, {x=59, y=71, z=32}, {x=35, y=74, z=32}, {x=23, y=75, z=32}, {x=35, y=58, z=33}, {x=62, y=60, z=33}, {x=18, y=63, z=33}, {x=73, y=67, z=33}, {x=37, y=74, z=33}, {x=65, y=75, z=33}, {x=38, y=2, z=34}, {x=67, y=52, z=34}, {x=71, y=60, z=34}, {x=25, y=63, z=34}, {x=19, y=64, z=34}, {x=32, y=66, z=34}, {x=66, y=72, z=34}, {x=41, y=81, z=34}, {x=45, y=93, z=34}, {x=54, y=99, z=34}, {x=38, y=5, z=35}, {x=68, y=48, z=35}, {x=69, y=51, z=35}, {x=48, y=53, z=35}, {x=37, y=57, z=35}, {x=77, y=58, z=35}, {x=32, y=60, z=35}, {x=20, y=61, z=35}, {x=27, y=61, z=35}, {x=33, y=65, z=35}, {x=58, y=65, z=35}, {x=58, y=72, z=35}, {x=60, y=73, z=35}, {x=30, y=74, z=35}, {x=41, y=74, z=35}, {x=41, y=87, z=35}, {x=22, y=58, z=36}, {x=64, y=58, z=36}, {x=39, y=70, z=36}, {x=36, y=77, z=36}, {x=44, y=83, z=36}, {x=40, y=86, z=36}, {x=35, y=56, z=37}, {x=65, y=59, z=37}, {x=66, y=62, z=37}, {x=62, y=67, z=37}, {x=39, y=68, z=37}, {x=40, y=86, z=37}, {x=53, y=88, z=37}, {x=43, y=97, z=37}, {x=52, y=99, z=37}, {x=37, y=3, z=38}, {x=35, y=55, z=38}, {x=38, y=56, z=38}, {x=25, y=57, z=38}, {x=65, y=57, z=38}, {x=71, y=61, z=38}, {x=33, y=65, z=38}, {x=61, y=65, z=38}, {x=50, y=66, z=38}, {x=38, y=68, z=38}, {x=46, y=97, z=38}, {x=44, y=100, z=38}, {x=51, y=102, z=38}, {x=29, y=42, z=39}, {x=27, y=43, z=39}, {x=70, y=48, z=39}, {x=72, y=52, z=39}, {x=23, y=57, z=39}, {x=26, y=57, z=39}, {x=28, y=58, z=39}, {x=55, y=58, z=39}, {x=73, y=59, z=39}, {x=65, y=65, z=39}, {x=41, y=68, z=39}, {x=42, y=81, z=39}, {x=55, y=88, z=39}, {x=43, y=91, z=39}, {x=45, y=100, z=39}, {x=23, y=57, z=40}, {x=29, y=57, z=40}, {x=76, y=58, z=40}, {x=73, y=59, z=40}, {x=78, y=59, z=40}, {x=31, y=60, z=40}, {x=64, y=64, z=40}, {x=41, y=67, z=40}, {x=42, y=75, z=40}, {x=37, y=78, z=40}, {x=42, y=92, z=40}, {x=51, y=101, z=40}, {x=48, y=105, z=40}, {x=75, y=59, z=41}, {x=55, y=63, z=41}, {x=35, y=68, z=41}, {x=35, y=69, z=41}, {x=35, y=71, z=41}, {x=34, y=42, z=42}, {x=29, y=55, z=42}, {x=50, y=61, z=42}, {x=34, y=65, z=42}, {x=57, y=88, z=42}, {x=48, y=89, z=42}, {x=49, y=89, z=42}, {x=27, y=22, z=43}, {x=26, y=28, z=43}, {x=31, y=46, z=43}, {x=66, y=52, z=43}, {x=49, y=57, z=43}, {x=56, y=57, z=43}, {x=41, y=69, z=43}, {x=36, y=52, z=44}, {x=63, y=54, z=44}, {x=51, y=55, z=44}, {x=57, y=56, z=44}, {x=69, y=57, z=44}, {x=64, y=65, z=44}, {x=55, y=90, z=44}, {x=30, y=42, z=45}, {x=31, y=52, z=45}, {x=51, y=54, z=45}, {x=24, y=57, z=45}, {x=70, y=62, z=45}, {x=39, y=69, z=45}, {x=35, y=80, z=45}, {x=29, y=81, z=45}, {x=44, y=85, z=45}, {x=41, y=86, z=45}, {x=33, y=9, z=46}, {x=28, y=44, z=46}, {x=50, y=54, z=46}, {x=47, y=55, z=46}, {x=45, y=56, z=46}, {x=45, y=58, z=46}, {x=47, y=58, z=46}, {x=30, y=63, z=46}, {x=27, y=81, z=46}, {x=28, y=81, z=46}, {x=40, y=86, z=46}, {x=29, y=16, z=47}, {x=32, y=10, z=48}, {x=66, y=49, z=48}, {x=29, y=52, z=48}, {x=53, y=54, z=48}, {x=55, y=54, z=48}, {x=61, y=58, z=48}, {x=59, y=61, z=48}, {x=50, y=63, z=48}, {x=26, y=82, z=48}, {x=43, y=85, z=48}, {x=48, y=86, z=48}, {x=31, y=19, z=49}, {x=30, y=46, z=49}, {x=63, y=51, z=49}, {x=41, y=53, z=49}, {x=31, y=60, z=49}, {x=67, y=1, z=50}, {x=37, y=8, z=50}, {x=40, y=30, z=50}, {x=43, y=57, z=50}, {x=59, y=57, z=50}, {x=60, y=57, z=50}, {x=29, y=61, z=50}, {x=34, y=63, z=50}, {x=49, y=65, z=50}, {x=65, y=3, z=51}, {x=45, y=29, z=51}, {x=41, y=58, z=51}, {x=42, y=60, z=51}, {x=46, y=64, z=51}, {x=47, y=67, z=51}, {x=52, y=68, z=51}, {x=69, y=51, z=52}, {x=53, y=55, z=52}, {x=45, y=62, z=52}, {x=64, y=2, z=53}, {x=3, y=3, z=53}, {x=10, y=6, z=53}, {x=31, y=14, z=53}, {x=37, y=35, z=53}, {x=43, y=48, z=53}, {x=71, y=50, z=53}, {x=52, y=54, z=53}, {x=43, y=57, z=53}, {x=55, y=57, z=53}, {x=52, y=67, z=53}, {x=48, y=72, z=53}, {x=5, y=1, z=54}, {x=9, y=4, z=54}, {x=62, y=4, z=54}, {x=33, y=8, z=54}, {x=42, y=29, z=54}, {x=42, y=32, z=54}, {x=43, y=34, z=54}, {x=41, y=39, z=54}, {x=41, y=57, z=54}, {x=34, y=61, z=54}, {x=58, y=2, z=55}, {x=59, y=3, z=55}, {x=38, y=7, z=55}, {x=40, y=12, z=55}, {x=38, y=39, z=55}, {x=33, y=46, z=55}, {x=28, y=54, z=55}, {x=29, y=55, z=55}, {x=30, y=57, z=55}, {x=54, y=58, z=55}, {x=52, y=63, z=55}, {x=37, y=7, z=56}, {x=55, y=8, z=56}, {x=33, y=45, z=56}, {x=58, y=0, z=57}, {x=9, y=5, z=57}, {x=34, y=7, z=57}, {x=54, y=8, z=57}, {x=17, y=9, z=57}, {x=32, y=12, z=57}, {x=37, y=39, z=57}, {x=41, y=45, z=57}, {x=31, y=46, z=57}, {x=49, y=50, z=57}, {x=50, y=56, z=57}, {x=46, y=59, z=57}, {x=48, y=66, z=57}, {x=51, y=67, z=57}, {x=15, y=3, z=58}, {x=8, y=10, z=58}, {x=41, y=11, z=58}, {x=40, y=13, z=58}, {x=42, y=45, z=58}, {x=50, y=51, z=58}, {x=20, y=5, z=59}, {x=19, y=7, z=59}, {x=22, y=8, z=59}, {x=23, y=9, z=59}, {x=40, y=13, z=59}, {x=33, y=14, z=59}, {x=42, y=41, z=59}, {x=20, y=6, z=60}, {x=9, y=8, z=60}, {x=46, y=8, z=60}, {x=34, y=39, z=60}, {x=30, y=52, z=60}, {x=43, y=57, z=60}, {x=18, y=5, z=61}, {x=11, y=10, z=61}, {x=36, y=36, z=61}, {x=47, y=55, z=61}, {x=38, y=56, z=61}, {x=61, y=59, z=61}, {x=56, y=60, z=61}, {x=36, y=6, z=62}, {x=55, y=7, z=62}, {x=26, y=10, z=62}, {x=29, y=13, z=62}, {x=46, y=13, z=62}, {x=57, y=60, z=62}, {x=18, y=7, z=63}, {x=30, y=11, z=63}, {x=53, y=13, z=63}, {x=45, y=14, z=63}, {x=36, y=32, z=63}, {x=46, y=41, z=63}, {x=29, y=43, z=63}, {x=29, y=44, z=63}, {x=29, y=46, z=63}, {x=29, y=50, z=63}, {x=30, y=52, z=63}, {x=46, y=54, z=63}, {x=19, y=6, z=64}, {x=54, y=8, z=64}, {x=16, y=11, z=64}, {x=42, y=16, z=64}, {x=36, y=25, z=64}, {x=37, y=27, z=64}, {x=36, y=28, z=64}, {x=37, y=29, z=64}, {x=40, y=33, z=64}, {x=30, y=36, z=64}, {x=43, y=39, z=64}, {x=62, y=61, z=64}, {x=21, y=6, z=65}, {x=24, y=6, z=65}, {x=53, y=10, z=65}, {x=52, y=12, z=65}, {x=27, y=17, z=65}, {x=39, y=17, z=65}, {x=29, y=19, z=65}, {x=32, y=22, z=65}, {x=28, y=42, z=65}, {x=60, y=61, z=65}, {x=24, y=6, z=66}, {x=26, y=6, z=66}, {x=19, y=12, z=66}, {x=28, y=20, z=66}, {x=31, y=26, z=66}, {x=39, y=55, z=66}, {x=42, y=6, z=67}, {x=24, y=7, z=67}, {x=20, y=14, z=67}, {x=41, y=21, z=67}, {x=28, y=22, z=67}, {x=29, y=46, z=67}, + {x=34, y=52, z=67}, {x=45, y=17, z=68}, {x=42, y=25, z=68}, {x=28, y=43, z=68}, {x=46, y=44, z=68}, {x=29, y=7, z=69}, {x=49, y=12, z=69}, {x=29, y=43, z=69}, {x=48, y=9, z=70}, {x=45, y=17, z=70}, {x=36, y=9, z=71}, {x=47, y=10, z=71}, {x=25, y=11, z=71}, {x=45, y=17, z=71}, {x=42, y=46, z=71}, {x=34, y=47, z=71}, {x=35, y=48, z=71}, {x=45, y=10, z=72}, {x=25, y=12, z=72}, {x=45, y=35, z=72}, {x=45, y=43, z=72}, {x=36, y=52, z=72}, {x=39, y=55, z=72}, {x=26, y=19, z=73}, {x=27, y=21, z=73}, {x=26, y=27, z=73}, {x=26, y=29, z=73}, {x=43, y=31, z=73}, {x=28, y=36, z=73}, {x=42, y=41, z=73}, {x=34, y=46, z=73}, {x=39, y=59, z=73}, {x=24, y=9, z=74}, {x=48, y=9, z=74}, {x=35, y=48, z=74}, {x=35, y=51, z=74}, {x=42, y=53, z=74}, {x=33, y=57, z=74}, {x=30, y=60, z=74}, {x=47, y=8, z=75}, {x=22, y=12, z=75}, {x=45, y=18, z=75}, {x=27, y=30, z=75}, {x=45, y=33, z=75}, {x=36, y=49, z=75}, {x=36, y=1, z=76}, {x=45, y=7, z=76}, {x=21, y=14, z=76}, {x=44, y=23, z=76}, {x=29, y=35, z=76}, {x=38, y=40, z=76}, {x=39, y=42, z=76}, {x=33, y=58, z=76}, {x=34, y=1, z=77}, {x=21, y=7, z=77}, {x=18, y=11, z=77}, {x=26, y=23, z=77}, {x=43, y=25, z=77}, {x=41, y=32, z=77}, {x=36, y=41, z=77}, {x=39, y=47, z=77}, {x=35, y=56, z=77}, {x=35, y=1, z=78}, {x=26, y=3, z=78}, {x=34, y=3, z=78}, {x=18, y=9, z=78}, {x=27, y=23, z=78}, {x=51, y=33, z=78}, {x=41, y=37, z=78}, {x=36, y=1, z=79}, {x=25, y=2, z=79}, {x=18, y=8, z=79}, {x=15, y=10, z=79}, {x=14, y=11, z=79}, {x=27, y=23, z=79}, {x=28, y=25, z=79}, {x=45, y=32, z=79}, {x=33, y=34, z=79}, {x=34, y=34, z=79}, {x=37, y=55, z=79}, {x=40, y=62, z=79}, {x=27, y=0, z=80}, {x=31, y=18, z=80}, {x=30, y=26, z=80}, {x=34, y=61, z=80}, {x=20, y=7, z=81}, {x=51, y=7, z=81}, {x=25, y=8, z=81}, {x=53, y=8, z=81}, {x=42, y=10, z=81}, {x=56, y=12, z=81}, {x=21, y=15, z=81}, {x=37, y=28, z=81}, {x=36, y=29, z=81}, {x=37, y=29, z=81}, {x=44, y=35, z=81}, {x=22, y=7, z=82}, {x=26, y=8, z=82}, {x=29, y=8, z=82}, {x=44, y=9, z=82}, {x=42, y=10, z=82}, {x=32, y=13, z=82}, {x=13, y=14, z=82}, {x=29, y=22, z=82}, {x=31, y=25, z=82}, {x=35, y=27, z=82}, {x=27, y=60, z=82}, {x=41, y=64, z=82}, {x=20, y=8, z=83}, {x=57, y=8, z=83}, {x=24, y=9, z=83}, {x=58, y=9, z=83}, {x=36, y=22, z=83}, {x=32, y=24, z=83}, {x=47, y=8, z=84}, {x=56, y=8, z=84}, {x=59, y=11, z=84}, {x=45, y=13, z=84}, {x=58, y=13, z=84}, {x=17, y=14, z=84}, {x=23, y=14, z=84}, {x=56, y=14, z=84}, {x=29, y=19, z=84}, {x=36, y=19, z=84}, {x=27, y=59, z=84}, {x=35, y=6, z=85}, {x=9, y=8, z=85}, {x=41, y=11, z=85}, {x=50, y=13, z=85}, {x=33, y=58, z=85}, {x=34, y=58, z=85}, {x=33, y=7, z=86}, {x=18, y=10, z=86}, {x=9, y=12, z=86}, {x=41, y=12, z=87}, {x=41, y=60, z=87}, {x=9, y=2, z=88}, {x=7, y=5, z=88}, {x=5, y=10, z=88}, {x=41, y=11, z=88}, {x=62, y=11, z=88}, {x=42, y=68, z=88}, {x=37, y=6, z=89}, {x=66, y=8, z=89}, {x=9, y=10, z=89}, {x=19, y=10, z=89}, {x=58, y=12, z=89}, {x=45, y=62, z=89}, {x=7, y=5, z=90}, {x=67, y=5, z=90}, {x=7, y=9, z=90}, {x=31, y=11, z=90}, {x=62, y=11, z=90}, {x=1, y=2, z=91}, {x=5, y=5, z=91}, {x=69, y=5, z=91}, {x=62, y=8, z=91}, {x=58, y=9, z=91}, {x=63, y=10, z=91}, {x=35, y=7, z=92}, {x=62, y=9, z=92}, {x=33, y=13, z=92}, {x=36, y=62, z=92}, {x=37, y=3, z=93}, {x=37, y=6, z=93}, {x=64, y=6, z=93}, {x=32, y=10, z=93}, {x=34, y=14, z=93}, {x=39, y=57, z=93}, {x=41, y=67, z=93}, {x=33, y=9, z=94}, {x=38, y=57, z=94}, {x=41, y=69, z=94}, {x=40, y=1, z=95}, {x=34, y=7, z=97}, {x=33, y=9, z=97}, {x=33, y=10, z=102}, {x=33, y=7, z=105}, {x=35, y=9, z=107} } }, { @@ -291,7 +293,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre center = {x = 30, y = 12, z = 36}, requiredIslandDepth = 16, requiredIslandRadius = 24, - nodesWithConstructor = { {x=35, y=53, z=1}, {x=33, y=59, z=1}, {x=32, y=58, z=3}, {x=31, y=57, z=5}, {x=40, y=58, z=6}, {x=29, y=57, z=7}, {x=39, y=51, z=8}, {x=52, y=53, z=8}, {x=32, y=53, z=9}, {x=25, y=58, z=9}, {x=51, y=51, z=10}, {x=47, y=50, z=11}, {x=50, y=55, z=11}, {x=28, y=57, z=11}, {x=26, y=39, z=12}, {x=30, y=39, z=12}, {x=24, y=40, z=12}, {x=53, y=52, z=12}, {x=29, y=57, z=12}, {x=43, y=59, z=12}, {x=26, y=39, z=13}, {x=36, y=48, z=13}, {x=27, y=39, z=14}, {x=39, y=48, z=14}, {x=33, y=50, z=14}, {x=43, y=50, z=14}, {x=24, y=59, z=14}, {x=41, y=49, z=15}, {x=33, y=12, z=16}, {x=36, y=46, z=16}, {x=50, y=51, z=16}, {x=46, y=57, z=16}, {x=36, y=45, z=17}, {x=27, y=46, z=17}, {x=22, y=48, z=17}, {x=45, y=50, z=17}, {x=31, y=38, z=18}, {x=32, y=38, z=18}, {x=39, y=46, z=18}, {x=51, y=51, z=18}, {x=33, y=10, z=20}, {x=24, y=44, z=20}, {x=44, y=56, z=20}, {x=35, y=13, z=21}, {x=40, y=41, z=21}, {x=39, y=46, z=21}, {x=43, y=47, z=21}, {x=43, y=56, z=22}, {x=26, y=38, z=23}, {x=25, y=39, z=23}, {x=21, y=40, z=23}, {x=40, y=46, z=23}, {x=22, y=47, z=23}, {x=43, y=47, z=23}, {x=45, y=49, z=23}, {x=31, y=60, z=23}, {x=41, y=44, z=24}, {x=19, y=51, z=24}, {x=37, y=58, z=24}, {x=35, y=12, z=25}, {x=24, y=39, z=25}, {x=36, y=39, z=25}, {x=43, y=47, z=25}, {x=20, y=48, z=25}, {x=32, y=11, z=26}, {x=25, y=46, z=26}, {x=39, y=46, z=26}, {x=16, y=47, z=26}, {x=30, y=14, z=27}, {x=38, y=39, z=27}, {x=25, y=41, z=27}, {x=39, y=42, z=27}, {x=13, y=45, z=27}, {x=38, y=46, z=27}, {x=51, y=51, z=27}, {x=12, y=7, z=28}, {x=14, y=7, z=28}, {x=15, y=11, z=28}, {x=20, y=44, z=28}, {x=28, y=46, z=28}, {x=17, y=60, z=28}, {x=11, y=8, z=29}, {x=52, y=9, z=29}, {x=22, y=13, z=29}, {x=15, y=43, z=29}, {x=29, y=46, z=29}, {x=34, y=46, z=29}, {x=16, y=60, z=29}, {x=23, y=0, z=30}, {x=18, y=13, z=30}, {x=30, y=13, z=30}, {x=33, y=30, z=30}, {x=36, y=40, z=30}, {x=9, y=43, z=30}, {x=10, y=43, z=30}, {x=40, y=55, z=30}, {x=20, y=60, z=30}, {x=8, y=61, z=30}, {x=22, y=1, z=31}, {x=26, y=12, z=31}, {x=18, y=14, z=31}, {x=24, y=15, z=31}, {x=34, y=28, z=31}, {x=35, y=30, z=31}, {x=30, y=36, z=31}, {x=9, y=43, z=31}, {x=31, y=48, z=31}, {x=40, y=49, z=31}, {x=8, y=60, z=31}, {x=29, y=13, z=32}, {x=41, y=15, z=32}, {x=39, y=16, z=32}, {x=38, y=17, z=32}, {x=31, y=25, z=32}, {x=34, y=25, z=32}, {x=35, y=28, z=32}, {x=29, y=34, z=32}, {x=29, y=35, z=32}, {x=37, y=35, z=32}, {x=12, y=42, z=32}, {x=15, y=42, z=32}, {x=36, y=48, z=32}, {x=40, y=49, z=32}, {x=43, y=10, z=33}, {x=30, y=28, z=33}, {x=36, y=30, z=33}, {x=36, y=37, z=33}, {x=11, y=42, z=33}, {x=16, y=42, z=33}, {x=25, y=43, z=33}, {x=35, y=49, z=33}, {x=45, y=53, z=33}, {x=25, y=58, z=33}, {x=35, y=9, z=34}, {x=43, y=10, z=34}, {x=44, y=10, z=34}, {x=30, y=13, z=34}, {x=29, y=31, z=34}, {x=18, y=42, z=34}, {x=22, y=42, z=34}, {x=15, y=49, z=34}, {x=52, y=52, z=34}, {x=49, y=53, z=34}, {x=33, y=55, z=34}, {x=49, y=56, z=34}, {x=36, y=10, z=35}, {x=44, y=10, z=35}, {x=23, y=14, z=35}, {x=42, y=14, z=35}, {x=28, y=27, z=35}, {x=36, y=31, z=35}, {x=30, y=35, z=35}, {x=47, y=55, z=35}, {x=28, y=58, z=35}, {x=12, y=59, z=35}, {x=33, y=8, z=36}, {x=47, y=8, z=36}, {x=39, y=15, z=36}, {x=34, y=34, z=36}, {x=18, y=42, z=36}, {x=51, y=51, z=36}, {x=56, y=51, z=36}, {x=48, y=52, z=36}, {x=58, y=52, z=36}, {x=39, y=59, z=36}, {x=35, y=9, z=37}, {x=48, y=9, z=37}, {x=38, y=23, z=37}, {x=33, y=35, z=37}, {x=39, y=35, z=37}, {x=24, y=37, z=37}, {x=10, y=42, z=37}, {x=5, y=44, z=37}, {x=7, y=61, z=37}, {x=24, y=35, z=38}, {x=36, y=38, z=38}, {x=48, y=51, z=38}, {x=46, y=52, z=38}, {x=44, y=53, z=38}, {x=45, y=54, z=38}, {x=13, y=55, z=38}, {x=21, y=55, z=38}, {x=8, y=60, z=38}, {x=33, y=6, z=39}, {x=34, y=9, z=39}, {x=29, y=12, z=39}, {x=27, y=14, z=39}, {x=39, y=32, z=39}, {x=31, y=37, z=39}, {x=22, y=39, z=39}, {x=28, y=43, z=39}, {x=42, y=45, z=39}, {x=5, y=47, z=39}, {x=29, y=57, z=39}, {x=55, y=58, z=39}, {x=21, y=64, z=39}, {x=37, y=11, z=40}, {x=26, y=15, z=40}, {x=41, y=38, z=40}, {x=40, y=41, z=40}, {x=41, y=42, z=40}, {x=8, y=43, z=40}, {x=40, y=44, z=40}, {x=50, y=49, z=40}, {x=61, y=52, z=40}, {x=42, y=55, z=40}, {x=38, y=56, z=40}, {x=35, y=59, z=40}, {x=30, y=20, z=41}, {x=32, y=33, z=41}, {x=34, y=48, z=41}, {x=48, y=48, z=41}, {x=11, y=55, z=41}, {x=9, y=59, z=41}, {x=32, y=23, z=42}, {x=28, y=36, z=42}, {x=18, y=42, z=42}, {x=12, y=43, z=42}, {x=60, y=51, z=42}, {x=11, y=55, z=42}, {x=27, y=56, z=42}, {x=40, y=12, z=43}, {x=41, y=13, z=43}, {x=26, y=39, z=43}, {x=44, y=40, z=43}, {x=13, y=43, z=43}, {x=30, y=58, z=43}, {x=9, y=64, z=43}, {x=27, y=10, z=44}, {x=26, y=11, z=44}, {x=36, y=14, z=44}, {x=41, y=38, z=44}, {x=36, y=39, z=44}, {x=24, y=43, z=44}, {x=1, y=47, z=44}, {x=33, y=50, z=44}, {x=60, y=51, z=44}, {x=24, y=52, z=44}, {x=31, y=59, z=44}, {x=25, y=11, z=45}, {x=25, y=12, z=45}, {x=27, y=12, z=45}, {x=24, y=13, z=45}, {x=34, y=44, z=45}, {x=30, y=56, z=45}, {x=41, y=14, z=46}, {x=40, y=41, z=46}, {x=60, y=52, z=46}, {x=8, y=57, z=46}, {x=34, y=58, z=46}, {x=24, y=9, z=47}, {x=39, y=12, z=47}, {x=23, y=44, z=47}, {x=48, y=44, z=47}, {x=58, y=46, z=47}, {x=8, y=52, z=47}, {x=9, y=58, z=47}, {x=33, y=58, z=47}, {x=36, y=58, z=47}, {x=27, y=11, z=48}, {x=42, y=11, z=48}, {x=15, y=44, z=48}, {x=34, y=44, z=48}, {x=49, y=45, z=48}, {x=31, y=50, z=48}, {x=39, y=52, z=48}, {x=40, y=55, z=48}, {x=9, y=56, z=48}, {x=44, y=13, z=49}, {x=12, y=43, z=49}, {x=59, y=46, z=49}, {x=25, y=52, z=49}, {x=55, y=60, z=49}, {x=20, y=61, z=49}, {x=25, y=8, z=50}, {x=46, y=12, z=50}, {x=43, y=43, z=50}, {x=15, y=44, z=50}, {x=8, y=51, z=50}, {x=3, y=44, z=51}, {x=33, y=44, z=51}, {x=39, y=51, z=51}, {x=46, y=8, z=52}, {x=46, y=10, z=52}, {x=22, y=13, z=52}, {x=58, y=45, z=52}, {x=21, y=11, z=53}, {x=33, y=45, z=53}, {x=60, y=46, z=53}, {x=14, y=49, z=53}, {x=23, y=50, z=53}, {x=41, y=50, z=53}, {x=45, y=55, z=53}, {x=49, y=55, z=53}, {x=38, y=58, z=53}, {x=11, y=46, z=54}, {x=7, y=47, z=54}, {x=28, y=56, z=54}, {x=41, y=58, z=54}, {x=38, y=59, z=54}, {x=49, y=44, z=55}, {x=30, y=58, z=55}, {x=50, y=44, z=56}, {x=54, y=45, z=56}, {x=16, y=49, z=56}, {x=20, y=50, z=56}, {x=20, y=57, z=56}, {x=37, y=44, z=57}, {x=45, y=59, z=57}, {x=24, y=58, z=58}, {x=46, y=60, z=58}, {x=40, y=43, z=59}, {x=39, y=48, z=59}, {x=53, y=49, z=59}, {x=39, y=44, z=60}, {x=41, y=44, z=61} }, + nodesWithConstructor = { {x=35, y=53, z=1}, {x=33, y=59, z=1}, {x=32, y=58, z=3}, {x=31, y=57, z=5}, {x=40, y=58, z=6}, {x=29, y=57, z=7}, {x=39, y=51, z=8}, {x=52, y=53, z=8}, {x=32, y=53, z=9}, {x=25, y=58, z=9}, {x=51, y=51, z=10}, {x=47, y=50, z=11}, {x=50, y=55, z=11}, {x=28, y=57, z=11}, {x=26, y=39, z=12}, {x=30, y=39, z=12}, {x=24, y=40, z=12}, {x=53, y=52, z=12}, {x=29, y=57, z=12}, {x=43, y=59, z=12}, {x=26, y=39, z=13}, {x=36, y=48, z=13}, {x=27, y=39, z=14}, {x=39, y=48, z=14}, {x=33, y=50, z=14}, {x=43, y=50, z=14}, {x=24, y=59, z=14}, {x=41, y=49, z=15}, {x=33, y=12, z=16}, {x=36, y=46, z=16}, {x=50, y=51, z=16}, {x=46, y=57, z=16}, {x=36, y=45, z=17}, {x=27, y=46, z=17}, {x=22, y=48, z=17}, {x=45, y=50, z=17}, {x=31, y=38, z=18}, {x=32, y=38, z=18}, {x=39, y=46, z=18}, {x=51, y=51, z=18}, {x=31, y=11, z=19}, {x=32, y=38, z=19}, {x=39, y=41, z=19}, {x=45, y=57, z=19}, {x=29, y=58, z=19}, {x=28, y=60, z=20}, {x=38, y=40, z=21}, {x=30, y=58, z=21}, {x=31, y=13, z=22}, {x=20, y=41, z=22}, {x=22, y=43, z=22}, {x=20, y=48, z=22}, {x=22, y=39, z=23}, {x=49, y=50, z=23}, {x=52, y=52, z=23}, {x=53, y=53, z=23}, {x=32, y=55, z=23}, {x=36, y=59, z=23}, {x=31, y=60, z=23}, {x=25, y=46, z=24}, {x=40, y=56, z=24}, {x=34, y=58, z=24}, {x=38, y=58, z=24}, {x=32, y=39, z=25}, {x=40, y=46, z=25}, {x=39, y=55, z=25}, {x=36, y=45, z=26}, {x=12, y=7, z=28}, {x=34, y=33, z=28}, {x=31, y=36, z=28}, {x=37, y=41, z=28}, {x=14, y=60, z=28}, {x=19, y=13, z=29}, {x=12, y=43, z=29}, {x=8, y=45, z=29}, {x=31, y=46, z=29}, {x=39, y=47, z=29}, {x=13, y=60, z=29}, {x=22, y=63, z=29}, {x=51, y=9, z=30}, {x=32, y=39, z=30}, {x=33, y=40, z=30}, {x=34, y=44, z=30}, {x=22, y=1, z=31}, {x=24, y=2, z=31}, {x=20, y=7, z=31}, {x=51, y=9, z=31}, {x=16, y=12, z=31}, {x=34, y=27, z=31}, {x=22, y=43, z=31}, {x=27, y=44, z=31}, {x=23, y=51, z=31}, {x=42, y=58, z=31}, {x=9, y=60, z=31}, {x=22, y=5, z=32}, {x=22, y=6, z=32}, {x=50, y=10, z=32}, {x=53, y=11, z=32}, {x=41, y=15, z=32}, {x=43, y=15, z=32}, {x=31, y=21, z=32}, {x=31, y=28, z=32}, {x=12, y=42, z=32}, {x=15, y=42, z=32}, {x=13, y=48, z=32}, {x=37, y=49, z=32}, {x=18, y=59, z=32}, {x=52, y=9, z=33}, {x=40, y=10, z=33}, {x=43, y=10, z=33}, {x=22, y=11, z=33}, {x=27, y=11, z=33}, {x=50, y=11, z=33}, {x=22, y=15, z=33}, {x=36, y=29, z=33}, {x=33, y=37, z=33}, {x=9, y=42, z=33}, {x=14, y=42, z=33}, {x=18, y=43, z=33}, {x=23, y=43, z=33}, {x=33, y=49, z=33}, {x=43, y=53, z=33}, {x=54, y=53, z=33}, {x=31, y=55, z=33}, {x=23, y=58, z=33}, {x=43, y=10, z=34}, {x=44, y=10, z=34}, {x=32, y=12, z=34}, {x=46, y=13, z=34}, {x=28, y=29, z=34}, {x=20, y=42, z=34}, {x=39, y=50, z=34}, {x=51, y=52, z=34}, {x=54, y=52, z=34}, {x=35, y=55, z=34}, {x=51, y=56, z=34}, {x=35, y=5, z=35}, {x=34, y=8, z=35}, {x=33, y=10, z=35}, {x=49, y=10, z=35}, {x=43, y=14, z=35}, {x=36, y=35, z=35}, {x=30, y=47, z=35}, {x=9, y=48, z=35}, {x=39, y=51, z=35}, {x=56, y=52, z=35}, {x=40, y=56, z=35}, {x=13, y=59, z=35}, {x=26, y=62, z=35}, {x=28, y=13, z=36}, {x=38, y=17, z=36}, {x=38, y=20, z=36}, {x=27, y=26, z=36}, {x=38, y=35, z=36}, {x=24, y=39, z=36}, {x=6, y=43, z=36}, {x=13, y=57, z=36}, {x=48, y=7, z=37}, {x=33, y=8, z=37}, {x=50, y=9, z=37}, {x=36, y=11, z=37}, {x=27, y=20, z=37}, {x=27, y=22, z=37}, {x=38, y=24, z=37}, {x=33, y=34, z=37}, {x=9, y=42, z=37}, {x=14, y=42, z=37}, {x=25, y=42, z=37}, {x=53, y=50, z=37}, {x=33, y=53, z=37}, {x=54, y=59, z=37}, {x=28, y=21, z=38}, {x=39, y=34, z=38}, {x=24, y=35, z=38}, {x=8, y=43, z=38}, {x=6, y=47, z=38}, {x=48, y=51, z=38}, {x=61, y=53, z=38}, {x=26, y=57, z=38}, {x=27, y=57, z=38}, {x=32, y=59, z=38}, {x=29, y=62, z=38}, {x=38, y=62, z=38}, {x=33, y=7, z=39}, {x=34, y=9, z=39}, {x=28, y=23, z=39}, {x=34, y=37, z=39}, {x=19, y=42, z=39}, {x=55, y=50, z=39}, {x=47, y=51, z=39}, {x=11, y=54, z=39}, {x=9, y=60, z=39}, {x=33, y=61, z=39}, {x=33, y=4, z=40}, {x=30, y=11, z=40}, {x=39, y=13, z=40}, {x=36, y=23, z=40}, {x=22, y=38, z=40}, {x=54, y=49, z=40}, {x=53, y=50, z=40}, {x=23, y=54, z=40}, {x=28, y=57, z=40}, {x=29, y=57, z=40}, {x=31, y=29, z=41}, {x=27, y=34, z=41}, {x=30, y=37, z=41}, {x=42, y=38, z=41}, {x=12, y=42, z=41}, {x=15, y=42, z=41}, {x=44, y=44, z=41}, {x=28, y=57, z=41}, {x=55, y=57, z=41}, {x=9, y=59, z=41}, {x=30, y=10, z=42}, {x=26, y=15, z=42}, {x=31, y=15, z=42}, {x=34, y=17, z=42}, {x=28, y=36, z=42}, {x=38, y=44, z=42}, {x=42, y=44, z=42}, {x=46, y=44, z=42}, {x=32, y=47, z=42}, {x=52, y=47, z=42}, {x=39, y=55, z=42}, {x=54, y=56, z=42}, {x=34, y=59, z=42}, {x=40, y=11, z=43}, {x=30, y=14, z=43}, {x=28, y=16, z=43}, {x=34, y=31, z=43}, {x=11, y=43, z=43}, {x=14, y=43, z=43}, {x=28, y=47, z=43}, {x=57, y=50, z=43}, {x=61, y=54, z=43}, {x=30, y=58, z=43}, {x=34, y=59, z=43}, {x=7, y=61, z=43}, {x=41, y=10, z=44}, {x=29, y=15, z=44}, {x=36, y=39, z=44}, {x=6, y=43, z=44}, {x=30, y=47, z=44}, {x=57, y=50, z=44}, {x=38, y=10, z=45}, {x=42, y=10, z=45}, {x=11, y=43, z=45}, {x=14, y=43, z=45}, {x=46, y=44, z=45}, {x=32, y=45, z=45}, {x=55, y=45, z=45}, {x=3, y=48, z=45}, {x=31, y=57, z=45}, {x=41, y=3, z=46}, {x=40, y=7, z=46}, {x=28, y=11, z=46}, {x=23, y=13, z=46}, {x=19, y=43, z=46}, {x=24, y=9, z=47}, {x=39, y=9, z=47}, {x=43, y=12, z=47}, {x=5, y=43, z=47}, {x=42, y=43, z=47}, {x=46, y=43, z=47}, {x=24, y=47, z=47}, {x=60, y=52, z=47}, {x=24, y=54, z=47}, {x=37, y=57, z=47}, {x=11, y=60, z=47}, {x=27, y=9, z=48}, {x=27, y=11, z=48}, {x=22, y=14, z=48}, {x=15, y=44, z=48}, {x=51, y=45, z=48}, {x=23, y=49, z=48}, {x=59, y=53, z=48}, {x=9, y=56, z=48}, {x=33, y=59, z=48}, {x=41, y=14, z=49}, {x=8, y=43, z=49}, {x=10, y=43, z=49}, {x=39, y=43, z=49}, {x=34, y=44, z=49}, {x=47, y=44, z=49}, {x=48, y=44, z=49}, {x=24, y=51, z=49}, {x=10, y=55, z=49}, {x=32, y=59, z=49}, {x=20, y=61, z=49}, {x=11, y=63, z=49}, {x=25, y=8, z=50}, {x=22, y=10, z=50}, {x=42, y=14, z=50}, {x=10, y=43, z=50}, {x=43, y=43, z=50}, {x=61, y=46, z=50}, {x=39, y=54, z=50}, {x=24, y=12, z=51}, {x=50, y=44, z=51}, {x=52, y=45, z=51}, {x=54, y=45, z=51}, {x=2, y=46, z=51}, {x=8, y=51, z=51}, {x=7, y=52, z=51}, {x=37, y=58, z=51}, {x=22, y=50, z=52}, {x=25, y=55, z=52}, {x=39, y=58, z=52}, {x=20, y=7, z=53}, {x=40, y=43, z=53}, {x=58, y=45, z=53}, {x=60, y=50, z=53}, {x=22, y=55, z=53}, {x=28, y=56, z=53}, {x=50, y=62, z=53}, {x=54, y=45, z=54}, {x=61, y=46, z=54}, {x=30, y=47, z=54}, {x=30, y=49, z=54}, {x=53, y=53, z=54}, {x=18, y=55, z=54}, {x=51, y=56, z=54}, {x=46, y=62, z=54}, {x=21, y=56, z=55}, {x=24, y=56, z=55}, {x=38, y=61, z=55}, {x=19, y=49, z=56}, {x=46, y=52, z=56}, {x=47, y=53, z=56}, {x=59, y=47, z=57}, {x=26, y=57, z=57}, {x=45, y=43, z=58}, {x=15, y=50, z=58}, {x=11, y=51, z=58}, {x=50, y=44, z=59}, {x=53, y=47, z=59}, {x=43, y=49, z=59}, {x=18, y=50, z=59}, {x=18, y=51, z=60}, {x=38, y=45, z=61}, {x=50, y=47, z=61}, {x=41, y=48, z=61} }, } }, MODNAME = minetest.get_current_modname() -- don't hardcode incase it's copied into other mods @@ -328,7 +330,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre end end - function generate_woodTypes(nodeName_templateWood, overlay, barkoverlay, nodesuffix, description, dropsTemplateWood) + local function generate_woodTypes(nodeName_templateWood, overlay, barkoverlay, nodesuffix, description, dropsTemplateWood) local trunkNode = minetest.registered_nodes[nodeName_templateWood] local newTrunkNode = {} @@ -368,7 +370,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre return newTrunkNode.name end - function generate_leafTypes(nodeName_templateLeaf, overlay, nodesuffix, description, dropsTemplateLeaf, glowVariantBrightness) + local function generate_leafTypes(nodeName_templateLeaf, overlay, nodesuffix, description, dropsTemplateLeaf, glowVariantBrightness) local leafNode = minetest.registered_nodes[nodeName_templateLeaf] local newLeafNode = {} @@ -405,7 +407,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre SkyTrees.disabled = "Could not find any tree nodes" return end - local normalwood = generate_woodTypes(templateWood, "", "", "Tree", "Giant tree", true) + local normalwood = generate_woodTypes(templateWood, "", "", "tree", "Giant tree", true) local darkwood = generate_woodTypes(templateWood, "^[colorize:black:205", "^[colorize:black:205", "darkwood", "Giant Ziricote", false) local deadwood = generate_woodTypes(templateWood, "^[colorize:#EFE6B9:110", "^[colorize:#E8D0A0:110", "deadbleachedwood", "Dead bleached wood", false) -- make use of the bark blocks to introduce some color variance in the tree @@ -460,6 +462,8 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre relativeProbability = 2, trunk = darkwood, vineflags = { hanging_roots = true }, + hasHeart = false, + hasSoil = false, init = function(self, position) -- 60% of these trees are a hanging roots variant @@ -469,7 +473,8 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre tree.theme["Dead"] = { relativeProbability = 0, -- 0 because this theme will be chosen based on location, rather than chance. - trunk = deadwood + trunk = deadwood, + hasHeart = false } tree.theme["Sakura"] = { @@ -543,9 +548,52 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre if theme.vineflags == nil then theme.vineflags = {} end if theme.relativeProbability == nil then theme.relativeProbability = 1.0 end if theme.glowing == nil then theme.glowing = false end + if theme.hasSoil == nil then theme.hasSoil = true end + if theme.hasHeart == nil then theme.hasHeart = true end end end + -- The heart of the Tree + -- The difference between a living tree and and a haunted/darkened husk + -- + -- Ideally trees would slowly fizzlefade to/from the Haunted theme depending on + -- whether a player takes or replaces the heart. + local heartwoodTexture = minetest.registered_nodes[templateWood].tiles + if type(heartwoodTexture) == "table" then heartwoodTexture = heartwoodTexture[1] end + local heartwoodGlow = 15 -- plants can grow under the heart of the Tree + if not BIOLUMINESCENCE then heartwoodGlow = 0 end -- :( + minetest.register_node( + SkyTrees.MODNAME .. ":HeartWood", + { + tiles = { heartwoodTexture }, + description="Heart of the Tree", + groups = {oddly_breakable_by_hand = 3}, + drawtype = "nodebox", + paramtype = "light", + light_source = 15, -- plants can grow under the heart of the Tree + node_box = { + type = "fixed", + fixed = { + --[[ Original heart + {-0.38, -0.38, -0.38, 0.38, 0.38, 0.38}, + {0.15, 0.15, 0.15, 0.5, 0.5, 0.5}, + {-0.5, 0.15, 0.15, -0.15, 0.5, 0.5}, + {-0.5, 0.15, -0.5, -0.15, 0.5, -0.15}, + {0.15, 0.15, -0.5, 0.5, 0.5, -0.15}, + {0.15, -0.5, -0.5, 0.5, -0.15, -0.15}, + {-0.5, -0.5, -0.5, -0.15, -0.15, -0.15}, + {-0.5, -0.5, 0.15, -0.15, -0.15, 0.5}, + {0.15, -0.5, 0.15, 0.5, -0.15, 0.5} + ]] + + {-0.38, -0.38, -0.38, 0.38, 0.38, 0.38}, + {-0.5, -0.2, -0.2, 0.5, 0.2, 0.2}, + {-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}, + {-0.2, -0.2, -0.5, 0.2, 0.2, 0.5} + } + } + } + ) end -- this is hack to work around how place_schematic() never invalidates its cache @@ -587,8 +635,8 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre -- Returns true if a tree in this location would be dead -- (checks for desert) SkyTrees.isDead = function(position) - heat = minetest.get_heat(position) - humidity = minetest.get_humidity(position) + local heat = minetest.get_heat(position) + local humidity = minetest.get_humidity(position) if humidity <= 10 or (humidity <= 20 and heat >= 80) then return true @@ -633,7 +681,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre end local selection = prng:next(0, sumProbabilities * 1000) / 1000 - minetest.log("info", "x: "..position.x.." y: ".. position.y .. " sumProbabilities: " .. sumProbabilities .. ", selection: " .. selection) + if DEBUG_SKYTREES then minetest.log("info", "Skytrees x: "..position.x.." y: ".. position.y .. " sumProbabilities: " .. sumProbabilities .. ", selection: " .. selection) end sumProbabilities = 0 for themeName,theme in pairs(schematicInfo.theme) do @@ -661,7 +709,7 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre end -- returns a new position vector, rotated around (0, 0) to match the schematic rotation (provided the schematic_size is correct!) - function rotatePositon(position, schematic_size, rotation) + local function rotatePositon(position, schematic_size, rotation) local result = vector.new(position); if rotation == 90 then result.x = position.z @@ -679,18 +727,25 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre local rotatedCenter = rotatePositon(schematicInfo.center, schematicInfo.size, rotation); local treePos = vector.subtract(position, rotatedCenter) - if topsoil == nil then - topsoil = 'ignore' - if minetest.get_biome_data == nil then error(SkyTrees.MODNAME .. " requires Minetest v5.0 or greater, or to have minor modifications to support v0.4.x", 0) end - local treeBiome = minetest.get_biome_data(position).biome - if treeBiome ~= nil and treeBiome.node_top ~= nil then topsoil = treeBiome.node_top end - end - if themeName == nil then themeName = SkyTrees.selectTheme(position, schematicInfo) end local theme = schematicInfo.theme[themeName] if theme == nil then error(MODNAME .. ' called SkyTrees.placeTree("' .. schematicInfo.filename .. '") with invalid theme: ' .. themeName, 0) end if theme.init ~= nil then theme.init(theme, position) end + if theme.hasSoil then + if topsoil == nil then + topsoil = 'ignore' + if minetest.get_biome_data == nil then error(SkyTrees.MODNAME .. " requires Minetest v5.0 or greater, or to have minor modifications to support v0.4.x", 0) end + local treeBiome = minetest.get_biome_data(position).biome + if treeBiome ~= nil and treeBiome.node_top ~= nil then topsoil = treeBiome.node_top end + end + else + topsoil = 'ignore' + end + + local nodeName_heart = SkyTrees.MODNAME .. ":HeartWood" + if not theme.hasHeart then nodeName_heart = 'ignore' end + -- theme.init() may have changed the vineflags, so update the replacement node names if theme.vineflags.hanging_leaves == true and SkyTrees.nodeName_hangingVine == 'ignore' then theme.vineflags.leaves = true end -- if there are no hanging vines then substitute side_vines if theme.vineflags.leaves == true then theme.leaf_vines = SkyTrees.nodeName_sideVines else theme.leaf_vines = 'ignore' end @@ -709,48 +764,63 @@ if SkyTrees == nil then -- If SkyTrees added into other mods, this may have alre ['bark_vines'] = theme.bark_vines, ['hanging_leaf_vines'] = theme.hanging_leaf_vines, ['hanging_bark_vines'] = theme.hanging_bark_vines, - ['default:dirt'] = topsoil + ['default:dirt'] = topsoil, + ['heart'] = nodeName_heart } - - if schemlib ~= nil then + + if minetest.global_exists("schemlib") then -- Use schemlib instead minetest.place_schematic(), to avoid bugs in place_schematic() - + local filename = minetest.get_modpath(SkyTrees.MODNAME) .. DIR_DELIM .. schematicInfo.filename local plan_obj = schemlib.plan.new() - plan_obj:read_from_schem_file(filename) + plan_obj:read_from_schem_file(filename, replacements) + plan_obj.data.ground_y = -1 -- prevent read_from_schem_file() from automatically adjusting the height when it encounters dirt in the schematic (SkyTrees sometimes have dirt up in their nooks) plan_obj.data.facedir = round(rotation / 90) - local rotatedCenter = plan_obj:get_world_pos(vector.multiply(schematicInfo.center, -1), position); -- this function performs the rotation I require, even if it's named/intended for something else. + local rotatedCenter = plan_obj:get_world_pos(vector.add(vector.multiply(schematicInfo.center, -1), -1), position); -- this function performs the rotation I require, even if it's named/intended for something else. plan_obj.data.anchor_pos = rotatedCenter + --[[ -- not sure how replacements are supposed to be specified in schemlib, surely not by writing value straight into the cache like this: for k, v in pairs(replacements) do plan_obj.mapping_cache[k] = { name = v, node_def = minetest.registered_nodes[v] } - end + end ]] + if DEBUG_SKYTREES then minetest.log("info", "building tree at " .. dump(position) .. "rotated to " .. dump(treePos) .. "rotatedCenter " .. dump(rotatedCenter) .. ", " .. schematicInfo.filename) end plan_obj:set_status("build") else -- fall back on minetest.place_schematic() local malleatedFilename = SkyTrees.getMalleatedFilename(schematicInfo, themeName) - --minetest.log("info", "Placing tree: " .. dump(treePos) .. ", " .. dump(rotatedCenter) .. ", " .. schematicInfo.filename) - minetest.place_schematic(treePos, malleatedFilename, rotation, replacements, true) - - -- minetest.place_schematic() doesn't invoke node constructors, so use set_node() for any nodes requiring construction - for i, schematicCoords in pairs(schematicInfo.nodesWithConstructor) do - if rotation ~= 0 then schematicCoords = rotatePositon(schematicCoords, schematicInfo.size, rotation) end - local nodePos = vector.add(treePos, schematicCoords) - local nodeToConstruct = minetest.get_node(nodePos) - if nodeToConstruct.name == "air" or nodeToConstruct.name == "ignore" then - --this is now normal - e.g. if vines are set to 'ignore' then the nodeToConstruct won't be there. - --minetest.log("error", "nodesWithConstructor["..i.."] does not match schematic " .. schematicInfo.filename .. " at " .. nodePos.x..","..nodePos.y..","..nodePos.z.." rotation "..rotation) - else - minetest.set_node(nodePos, nodeToConstruct) - end - end + if DEBUG_SKYTREES then minetest.log("info", "placing tree at " .. dump(position) .. "rotated to " .. dump(treePos) .. "rotatedCenter " .. dump(rotatedCenter) .. ", " .. schematicInfo.filename) end + + -- Defering minetest.place_schematic() until after the lua emerge seems to reduce the likelyhood of + -- having it draw the tree with pieces missing. + minetest.after( + 0.1, + function(treePos, malleatedFilename, rotation, replacements, schematicInfo) + + minetest.place_schematic(treePos, malleatedFilename, rotation, replacements, true) + + -- minetest.place_schematic() doesn't invoke node constructors, so use set_node() for any nodes requiring construction + for i, schematicCoords in pairs(schematicInfo.nodesWithConstructor) do + if rotation ~= 0 then schematicCoords = rotatePositon(schematicCoords, schematicInfo.size, rotation) end + local nodePos = vector.add(treePos, schematicCoords) + local nodeToConstruct = minetest.get_node(nodePos) + if nodeToConstruct.name == "air" or nodeToConstruct.name == "ignore" then + --this is now normal - e.g. if vines are set to 'ignore' then the nodeToConstruct won't be there. + --minetest.log("error", "nodesWithConstructor["..i.."] does not match schematic " .. schematicInfo.filename .. " at " .. nodePos.x..","..nodePos.y..","..nodePos.z.." rotation "..rotation) + else + minetest.set_node(nodePos, nodeToConstruct) + end + end + + end, + treePos, malleatedFilename, rotation, replacements, schematicInfo + ) end end @@ -1307,7 +1377,7 @@ local function addDetail_skyTree(decoration_list, core, vm, minp, maxp) z = coreZ + math_floor((prng:next(-maxOffsetFromCenter, maxOffsetFromCenter) + prng:next(-maxOffsetFromCenter, maxOffsetFromCenter)) / 2) } - if schemlib ~= nil then + if minetest.global_exists("schemlib") then -- This check is skipped when not using schemlib, because while redrawing the tree multiple times - every time a chunk it -- touches gets emitted - might be slower, it helps work around the bugs in minetest.place_schematic() where large schematics -- are spawned incompletely. diff --git a/cloudlands_tree1.mts b/cloudlands_tree1.mts index f32a83f..345cd5d 100644 Binary files a/cloudlands_tree1.mts and b/cloudlands_tree1.mts differ diff --git a/cloudlands_tree2.mts b/cloudlands_tree2.mts index b7ad4f3..6af3b12 100644 Binary files a/cloudlands_tree2.mts and b/cloudlands_tree2.mts differ