From 5bbed11e510bb58fa5661016137fd6c2ba43b612 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Nov 2020 19:56:36 +0100 Subject: [PATCH] fixes --- birch/init.lua | 53 +++++++++++++++++---------- chestnuttree/init.lua | 28 +++++++++++--- ebony/init.lua | 2 +- ebony/mod.conf | 2 +- hollytree/init.lua | 28 +++++++++++--- jacaranda/init.lua | 2 +- jacaranda/mod.conf | 2 +- mahogany/init.lua | 2 +- maple/init.lua | 23 +++++++++--- oak/init.lua | 23 +++++++++--- palm/textures/palm_coconut_slice.png | Bin pineapple/init.lua | 2 +- pineapple/mod.conf | 2 +- 13 files changed, 123 insertions(+), 46 deletions(-) mode change 100644 => 100755 palm/textures/palm_coconut_slice.png diff --git a/birch/init.lua b/birch/init.lua index 588841e..3cc4f0f 100644 --- a/birch/init.lua +++ b/birch/init.lua @@ -86,28 +86,43 @@ end -- Decoration -- +local place_on +local biomes +local offset +local scale + if minetest.get_modpath("rainf") then - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"rainf:meadow"}, - sidelen = 16, - noise_params = { - offset = 0.01, - scale = 0.001, - spread = {x = 255, y = 255, z = 255}, - seed = 32, - octaves = 3, - persist = 0.67 - }, - biomes = {"rainf"}, - y_min = 1, - y_max = 80, - schematic = birch.birchtree, - flags = "place_center_x, place_center_z", - place_offset_y = 1, - }) + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.01 + scale = 0.001 +else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.008 + scale = 0.001 end +minetest.register_decoration({ + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 255, y = 255, z = 255}, + seed = 32, + octaves = 3, + persist = 0.67 + }, + biomes = {biomes}, + y_min = 1, + y_max = 80, + schematic = birch.birchtree, + flags = "place_center_x, place_center_z", + place_offset_y = 1, +}) + -- -- Nodes -- diff --git a/chestnuttree/init.lua b/chestnuttree/init.lua index 4a9dccd..a14df80 100644 --- a/chestnuttree/init.lua +++ b/chestnuttree/init.lua @@ -66,20 +66,38 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + local place_on + local biomes + local offset + local scale + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00004 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.00005 + scale = 0.00004 + end + minetest.register_decoration({ deco_type = "schematic", - place_on = {"rainf:meadow"}, + place_on = {place_on}, sidelen = 16, noise_params = { - offset = 0.0008, - scale = 0.00004, + offset = offset, + scale = scale, spread = {x = 250, y = 250, z = 250}, seed = 278, octaves = 3, persist = 0.66 }, - biomes = {"rainf"}, + biomes = {biomes}, y_min = 1, y_max = 80, schematic = modpath.."/schematics/chestnuttree.mts", diff --git a/ebony/init.lua b/ebony/init.lua index 367d2c2..4f2622b 100644 --- a/ebony/init.lua +++ b/ebony/init.lua @@ -25,7 +25,7 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_rainforest_litter"}, diff --git a/ebony/mod.conf b/ebony/mod.conf index 6869b1e..009ccee 100644 --- a/ebony/mod.conf +++ b/ebony/mod.conf @@ -1,4 +1,4 @@ name = ebony description = Ebony Tree for Rainforest Biome depends = default -optional_depends = stairs, bonemeal, rainf +optional_depends = stairs, bonemeal diff --git a/hollytree/init.lua b/hollytree/init.lua index d681a42..d551747 100644 --- a/hollytree/init.lua +++ b/hollytree/init.lua @@ -24,20 +24,38 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + local place_on + local biomes + local offset + local scale + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00005 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.00008 + scale = 0.00005 + end + minetest.register_decoration({ deco_type = "schematic", - place_on = {"rainf:meadow"}, + place_on = {place_on}, sidelen = 16, noise_params = { - offset = 0.0008, - scale = 0.00005, + offset = offset, + scale = scale, spread = {x = 250, y = 250, z = 250}, seed = 789, octaves = 3, persist = 0.66 }, - biomes = {"rainf"}, + biomes = {biomes}, y_min = 1, y_max = 32, schematic = modpath.."/schematics/hollytree.mts", diff --git a/jacaranda/init.lua b/jacaranda/init.lua index 50dffb0..26f89d9 100644 --- a/jacaranda/init.lua +++ b/jacaranda/init.lua @@ -24,7 +24,7 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_rainforest_litter"}, diff --git a/jacaranda/mod.conf b/jacaranda/mod.conf index 0d09678..a6d2e56 100644 --- a/jacaranda/mod.conf +++ b/jacaranda/mod.conf @@ -1,4 +1,4 @@ name = jacaranda description = Jacaranda for jungles depends = default -optional_depends = stairs, bonemeal, rainf +optional_depends = stairs, bonemeal diff --git a/mahogany/init.lua b/mahogany/init.lua index 32868f3..d64c80d 100644 --- a/mahogany/init.lua +++ b/mahogany/init.lua @@ -26,7 +26,7 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_rainforest_litter"}, diff --git a/maple/init.lua b/maple/init.lua index 46f5fae..f801ae9 100644 --- a/maple/init.lua +++ b/maple/init.lua @@ -25,20 +25,33 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0005 + scale = 0.0002 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.0002 + scale = 0.0002 + end + minetest.register_decoration({ deco_type = "schematic", - place_on = {"rainf:meadow"}, + place_on = {place_on}, sidelen = 16, noise_params = { - offset = 0.0005, - scale = 0.0002, + offset = offset, + scale = scale, spread = {x = 250, y = 250, z = 250}, seed = 3462, octaves = 3, persist = 0.66 }, - biomes = {"rainf"}, + biomes = {biomes}, y_min = 1, y_max = 62, schematic = modpath.."/schematics/maple.mts", diff --git a/oak/init.lua b/oak/init.lua index 401988e..de085ba 100644 --- a/oak/init.lua +++ b/oak/init.lua @@ -50,20 +50,33 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00004 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.0008 + scale = 0.00004 + end + minetest.register_decoration({ deco_type = "schematic", - place_on = {"rainf:meadow"}, + place_on = {place_on}, sidelen = 16, noise_params = { - offset = 0.0008, - scale = 0.00004, + offset = offset, + scale = scale, spread = {x = 250, y = 250, z = 250}, seed = 6431, octaves = 3, persist = 0.66 }, - biomes = {"rainf"}, + biomes = {biomes}, y_min = 1, y_max = 80, schematic = modpath.."/schematics/oak.mts", diff --git a/palm/textures/palm_coconut_slice.png b/palm/textures/palm_coconut_slice.png old mode 100644 new mode 100755 diff --git a/pineapple/init.lua b/pineapple/init.lua index 3c5e4e4..6c048e3 100644 --- a/pineapple/init.lua +++ b/pineapple/init.lua @@ -25,7 +25,7 @@ end -- Decoration -- -if mg_name ~= "v6" and mg_name ~= "singlenode" and minetest.get_modpath("rainf") then +if mg_name ~= "v6" and mg_name ~= "singlenode" then minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_rainforest_litter"}, diff --git a/pineapple/mod.conf b/pineapple/mod.conf index fb30573..3293928 100644 --- a/pineapple/mod.conf +++ b/pineapple/mod.conf @@ -1,4 +1,4 @@ name = pineapple description = Pineapple tree for the jungle depends = default -optional_depends = bonemeal, rainf +optional_depends = bonemeal