mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Change jungle tree schematic, update jungle biome
This commit is contained in:
parent
7fcaf68e25
commit
a4363b975d
5 changed files with 42 additions and 22 deletions
|
@ -227,7 +227,11 @@ function mcl_core.generate_tree(pos, tree_type, two_by_two)
|
|||
local node
|
||||
|
||||
if tree_type == nil or tree_type == 1 then
|
||||
mcl_core.generate_oak_tree(pos)
|
||||
if mg_name == "v6" then
|
||||
mcl_core.generate_v6_oak_tree(pos)
|
||||
else
|
||||
mcl_core.generate_oak_tree(pos)
|
||||
end
|
||||
elseif tree_type == 2 and two_by_two then
|
||||
mcl_core.generate_dark_oak_tree(pos)
|
||||
elseif tree_type == 3 then
|
||||
|
@ -242,7 +246,11 @@ function mcl_core.generate_tree(pos, tree_type, two_by_two)
|
|||
if two_by_two then
|
||||
mcl_core.generate_huge_jungle_tree(pos)
|
||||
else
|
||||
mcl_core.generate_jungle_tree(pos)
|
||||
if mg_name == "v6" then
|
||||
mcl_core.generate_v6_jungle_tree(pos)
|
||||
else
|
||||
mcl_core.generate_jungle_tree(pos)
|
||||
end
|
||||
end
|
||||
elseif tree_type == 6 then
|
||||
mcl_core.generate_birch_tree(pos)
|
||||
|
@ -250,7 +258,7 @@ function mcl_core.generate_tree(pos, tree_type, two_by_two)
|
|||
end
|
||||
|
||||
-- Classic oak in v6 style
|
||||
local function generate_v6_oak(pos)
|
||||
function mcl_core.generate_v6_oak_tree(pos)
|
||||
local trunk = "mcl_core:tree"
|
||||
local leaves = "mcl_core:leaves"
|
||||
node = {name = ""}
|
||||
|
@ -316,13 +324,9 @@ end
|
|||
|
||||
-- Oak
|
||||
function mcl_core.generate_oak_tree(pos)
|
||||
if mg_name == "v6" then
|
||||
generate_v6_oak_tree(pos)
|
||||
else
|
||||
local path = minetest.get_modpath("mcl_core") ..
|
||||
"/schematics/mcl_core_oak_classic.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1 , z = pos.z - 2}, path, "random", nil, false)
|
||||
end
|
||||
local path = minetest.get_modpath("mcl_core") ..
|
||||
"/schematics/mcl_core_oak_classic.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1 , z = pos.z - 2}, path, "random", nil, false)
|
||||
end
|
||||
|
||||
-- Birch
|
||||
|
@ -538,7 +542,7 @@ local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
|
|||
end
|
||||
|
||||
-- Old jungle tree grow function from Minetest Game 0.4.15, imitating v6 jungle trees
|
||||
function mcl_core.generate_jungle_tree(pos)
|
||||
function mcl_core.generate_v6_jungle_tree(pos)
|
||||
--[[
|
||||
NOTE: Jungletree-placing code is currently duplicated in the engine
|
||||
and in games that have saplings; both are deprecated but not
|
||||
|
@ -584,6 +588,12 @@ function mcl_core.generate_jungle_tree(pos)
|
|||
vm:update_map()
|
||||
end
|
||||
|
||||
function mcl_core.generate_jungle_tree(pos)
|
||||
local path = minetest.get_modpath("mcl_core") ..
|
||||
"/schematics/mcl_core_jungle_tree.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, path, "random", nil, false)
|
||||
end
|
||||
|
||||
-- Generate huge jungle tree with 2×2 trunk.
|
||||
-- With pos being the lower X and the higher Z value of the trunk.
|
||||
function mcl_core.generate_huge_jungle_tree(pos)
|
||||
|
|
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_jungle_tree.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_jungle_tree.mts
Normal file
Binary file not shown.
|
@ -1023,7 +1023,7 @@ local function register_decorations()
|
|||
-- Oak
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"mcl_core:dirt_with_grass"},
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.025,
|
||||
|
@ -1044,9 +1044,9 @@ local function register_decorations()
|
|||
-- Jungle tree
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol"},
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.002,
|
||||
fill_ratio = 0.0025,
|
||||
biomes = {"rainforest"},
|
||||
y_min = 4,
|
||||
y_max = mcl_vars.mg_overworld_max,
|
||||
|
@ -1056,13 +1056,26 @@ local function register_decorations()
|
|||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol"},
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.09,
|
||||
fill_ratio = 0.045,
|
||||
biomes = {"rainforest", "rainforest_swamp"},
|
||||
y_min = 0,
|
||||
y_min = 1,
|
||||
y_max = mcl_vars.mg_overworld_max,
|
||||
schematic = minetest.get_modpath("mcl_core").."/schematics/jungle_tree.mts",
|
||||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
-- Oak in jungle
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.004,
|
||||
biomes = {"rainforest"},
|
||||
y_min = 1,
|
||||
y_max = mcl_vars.mg_overworld_max,
|
||||
schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1348,7 +1361,7 @@ local function register_decorations()
|
|||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
||||
sidelen = 80,
|
||||
noise_params = {
|
||||
offset = 0.0096,
|
||||
offset = 0.0196,
|
||||
scale = 0.025,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 2930,
|
||||
|
|
|
@ -2,8 +2,5 @@
|
|||
-- Because these legacy schematics still use Minetest Game node names.
|
||||
-- TODO: Update the offending schematics and delete this mod.
|
||||
|
||||
minetest.register_alias("default:jungletree", "mcl_core:jungletree")
|
||||
minetest.register_alias("default:pine_tree", "mcl_core:sprucetree")
|
||||
|
||||
minetest.register_alias("default:jungleleaves", "mcl_core:jungleleaves")
|
||||
minetest.register_alias("default:pine_needles", "mcl_core:spruceleaves")
|
||||
|
|
Loading…
Reference in a new issue