1 Commits

Author SHA1 Message Date
767d3e5ef7 use enable_unique_ids on all tree nodes (but not saplings)
remove long-dead paramtype2="waving" entries
(it's just node def entry, waving=1 now)

misc whitespace fixes
2015-07-19 15:37:42 -04:00
95 changed files with 450 additions and 314 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
LICENSE Executable file → Normal file
View File

2
README.md Executable file → Normal file
View File

@ -8,4 +8,4 @@ jungle trees mod, and big contributions by RealBadAngel.
Brought together into one mod and made L-systems compatible by Vanessa Brought together into one mod and made L-systems compatible by Vanessa
Ezekowitz. Ezekowitz.
Dependencies: <a href="https://forum.minetest.net/viewtopic.php?f=11&t=12999">biome_lib</a> and default Dependencies: <a href="https://github.com/VanessaE/plantlife">plants_lib</a> and default

33
biome_defs.lua Executable file → Normal file
View File

@ -91,7 +91,7 @@ moretrees.willow_biome = {
} }
moretrees.acacia_biome = { moretrees.acacia_biome = {
surface = { "default:dirt_with_grass", "default:dirt_with_dry_grass", "default:desert_sand" }, surface = { "default:dirt_with_grass", "default:desert_sand" },
avoid_nodes = moretrees.avoidnodes, avoid_nodes = moretrees.avoidnodes,
avoid_radius = 15, avoid_radius = 15,
seed_diff = 1, seed_diff = 1,
@ -118,24 +118,18 @@ moretrees.rubber_tree_biome = {
} }
moretrees.jungletree_biome = { moretrees.jungletree_biome = {
surface = { surface = "default:dirt_with_grass",
"default:dirt", avoid_nodes = moretrees.avoidnodes,
"default:dirt_with_grass", avoid_radius = 5,
"woodsoils:dirt_with_leaves_1",
"woodsoils:grass_with_leaves_1",
"woodsoils:grass_with_leaves_2"
},
avoid_nodes = {"moretrees:jungletree_trunk"},
max_count = 12,
avoid_radius = 3,
rarity = 85,
seed_diff = 329, seed_diff = 329,
min_elevation = 1, min_elevation = -5,
near_nodes = {"default:jungletree"}, max_elevation = 10,
near_nodes_size = 6, temp_min = 0.25,
near_nodes_vertical = 2, near_nodes = {"default:water_source"},
near_nodes_count = 1, near_nodes_size = 20,
plantlife_limit = -0.9, near_nodes_count = 7,
rarity = 10,
max_count = 10,
} }
moretrees.spruce_biome = { moretrees.spruce_biome = {
@ -150,7 +144,7 @@ moretrees.spruce_biome = {
max_count = 5, max_count = 5,
} }
moretrees.cedar_biome = { moretrees.pine_biome = {
surface = "default:dirt_with_grass", surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes, avoid_nodes = moretrees.avoidnodes,
avoid_radius = 10, avoid_radius = 10,
@ -186,3 +180,4 @@ moretrees.fir_biome_snow = {
delete_above = true, delete_above = true,
spawn_replace_node = true spawn_replace_node = true
} }

43
crafts.lua Executable file → Normal file
View File

@ -3,24 +3,13 @@ local S = moretrees.intllib
for i in ipairs(moretrees.treelist) do for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1] local treename = moretrees.treelist[i][1]
-- MODIFICATION MADE FOR MFF //MFF(Mg|08/12/15) minetest.register_craft({
if minetest.registered_items["moretrees:" .. treename .. "_trunk_sideways"] then output = "moretrees:"..treename.."_trunk 2",
minetest.register_craft({ recipe = {
output = "moretrees:"..treename.."_trunk 2", {"moretrees:"..treename.."_trunk_sideways"},
recipe = { {"moretrees:"..treename.."_trunk_sideways"}
{"moretrees:"..treename.."_trunk_sideways"}, }
{"moretrees:"..treename.."_trunk_sideways"} })
}
})
minetest.register_craft({
type = "shapeless",
output = "moretrees:"..treename.."_planks 4",
recipe = {
"moretrees:"..treename.."_trunk_sideways"
}
})
end
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
@ -30,6 +19,14 @@ for i in ipairs(moretrees.treelist) do
} }
}) })
minetest.register_craft({
type = "shapeless",
output = "moretrees:"..treename.."_planks 4",
recipe = {
"moretrees:"..treename.."_trunk_sideways"
}
})
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "moretrees:"..treename.."_sapling", recipe = "moretrees:"..treename.."_sapling",
@ -83,9 +80,9 @@ minetest.register_craftitem("moretrees:spruce_nuts", {
on_use = minetest.item_eat(1), on_use = minetest.item_eat(1),
}) })
minetest.register_craftitem("moretrees:cedar_nuts", { minetest.register_craftitem("moretrees:pine_nuts", {
description = S("Roasted Cedar Cone Nuts"), description = S("Roasted Pine Cone Nuts"),
inventory_image = "moretrees_cedar_nuts.png", inventory_image = "moretrees_pine_nuts.png",
on_use = minetest.item_eat(1), on_use = minetest.item_eat(1),
}) })
@ -141,8 +138,8 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
type = "cooking", type = "cooking",
output = "moretrees:cedar_nuts 4", output = "moretrees:pine_nuts 4",
recipe = "moretrees:cedar_cone", recipe = "moretrees:pine_cone",
}) })
minetest.register_craft({ minetest.register_craft({

47
default_settings.txt Executable file → Normal file
View File

@ -6,7 +6,7 @@ moretrees.enable_apple_tree = true
moretrees.enable_oak = true moretrees.enable_oak = true
moretrees.enable_sequoia = true moretrees.enable_sequoia = true
moretrees.enable_palm = true moretrees.enable_palm = true
moretrees.enable_cedar = true moretrees.enable_pine = true
moretrees.enable_rubber_tree = true moretrees.enable_rubber_tree = true
moretrees.enable_willow = true moretrees.enable_willow = true
moretrees.enable_acacia = true moretrees.enable_acacia = true
@ -17,16 +17,14 @@ moretrees.enable_fir = true
moretrees.enable_beech = false moretrees.enable_beech = false
-- set this to true to make moretrees spawn saplings at mapgen time instead -- set this to true to make moretrees spawn saplings at mapgen time instead
-- of fully-grown trees, which will grow into full trees after a very short -- of fully-grown trees, which will grow into full trees very quickly. With
-- delay. This reduces mapgen lag in some situations. -- older versions of plants_lib, doing this will reduce mapgen lag.
moretrees.spawn_saplings = false moretrees.spawn_saplings = false
-- Set this to true to allow defining stairs/slabs/etc. If Moreblocks is -- Set this to true to allow usage of the stairsplus mod in moreblocks
-- installed, this will use that mod's Stairs Plus component. Otherwise, it
-- will use the default stairs mod in minetest_game, if present
moretrees.enable_stairs = true moretrees.enable_stairsplus = true
-- Set this to true if you want the plantlike drawtype for leaves, which -- Set this to true if you want the plantlike drawtype for leaves, which
-- improves some peoples' framerates without resorting to making leaf nodes opaque. -- improves some peoples' framerates without resorting to making leaf nodes opaque.
@ -34,21 +32,42 @@ moretrees.enable_stairs = true
moretrees.plantlike_leaves = false moretrees.plantlike_leaves = false
-- Set this to true to enable leaf decay of all trees except the default ones.
moretrees.enable_leafdecay = true
-- Enable this one if you want this mod's leafdecay code to affect the old
-- default trees too; this setting is independent of the one above. You'll
-- want to manually disable the default leafdecay code in minetest_game if
-- you enable this, otherwise you'll have two sets of leaf decay code running
-- at the same time, which will just waste CPU for no benefit.
moretrees.enable_default_leafdecay = true
-- Enable this one for default *jungle* leaves
moretrees.enable_default_jungle_leafdecay = true
-- Enable this if you want moretrees to redefine default apples so that they -- Enable this if you want moretrees to redefine default apples so that they
-- fall when leaves decay/are dug. -- fall when leaves decay/are dug.
moretrees.enable_redefine_apple = true moretrees.enable_redefine_apple = true
-- Set this to true to enable leaf decay of all trees except the default ones. -- various settings to configure default and default-jungle leaf decay.
moretrees.enable_leafdecay = true
-- various related settings to configure leaf decay.
moretrees.leafdecay_delay = 2 moretrees.leafdecay_delay = 2
moretrees.leafdecay_chance = 5 moretrees.leafdecay_chance = 100
moretrees.leafdecay_radius = 5 moretrees.leafdecay_radius = 5
moretrees.palm_leafdecay_radius = 10
moretrees.default_jungle_leafdecay_delay = 2
moretrees.default_jungle_leafdecay_chance = 100
moretrees.default_jungle_leafdecay_radius = 5
moretrees.palm_leafdecay_radius = 15
moretrees.default_leafdecay_delay = 3
moretrees.default_leafdecay_chance = 50
moretrees.default_leafdecay_radius = 4
-- Change these settings if you want default trees to be gradually cut down -- Change these settings if you want default trees to be gradually cut down
-- above the elevation where firs normally generate. -- above the elevation where firs normally generate.

3
depends.txt Executable file → Normal file
View File

@ -1,6 +1,5 @@
default default
biome_lib plants_lib
stairs?
moreblocks? moreblocks?
intllib? intllib?

View File

@ -1 +0,0 @@
This mod adds a whole bunch of new types of trees to the game

110
init.lua Executable file → Normal file
View File

@ -13,7 +13,8 @@
-- by RealBadAngel. -- by RealBadAngel.
-- --
-- License: WTFPL for all parts (code and textures, including those copied -- License: WTFPL for all parts (code and textures, including those copied
-- from the the old jungletree and conifers mods). -- from the jungletree and conifers mods) except the default jungle tree trunk
-- texture, which is CC-By-SA.
moretrees = {} moretrees = {}
@ -24,8 +25,21 @@ local modpath=minetest.get_modpath("moretrees")
dofile(modpath.."/default_settings.txt") dofile(modpath.."/default_settings.txt")
if io.open(worldpath.."/moretrees_settings.txt","r") then if io.open(worldpath.."/moretrees_settings.txt","r") == nil then
io.close()
io.input(modpath.."/default_settings.txt")
io.output(worldpath.."/moretrees_settings.txt")
local size = 2^13 -- good buffer size (8K)
while true do
local block = io.read(size)
if not block then
io.close()
break
end
io.write(block)
end
else
dofile(worldpath.."/moretrees_settings.txt") dofile(worldpath.."/moretrees_settings.txt")
end end
@ -38,17 +52,6 @@ else
end end
moretrees.intllib = S moretrees.intllib = S
-- clone node
function moretrees.clone_node(name)
local node2 = {}
local node = minetest.registered_nodes[name]
for k,v in pairs(node) do
node2[k]=v
end
return node2
end
-- infinite stacks checking -- infinite stacks checking
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
@ -64,19 +67,19 @@ moretrees.cutting_tools = {
"default:axe_diamond", "default:axe_diamond",
"default:axe_mese", "default:axe_mese",
"default:axe_steel", "default:axe_steel",
-- "glooptest:axe_alatro", "glooptest:axe_alatro",
-- "glooptest:axe_arol", "glooptest:axe_arol",
"default:axe_mithril", "moreores:axe_mithril",
"default:axe_silver", "moreores:axe_silver",
-- "titanium:axe", "titanium:axe",
} }
-- Cutting tools disabled. They are unknown //MFF(Mg|08/09/15)
dofile(modpath.."/tree_models.lua") dofile(modpath.."/tree_models.lua")
dofile(modpath.."/node_defs.lua") dofile(modpath.."/node_defs.lua")
dofile(modpath.."/biome_defs.lua") dofile(modpath.."/biome_defs.lua")
dofile(modpath.."/saplings.lua") dofile(modpath.."/saplings.lua")
dofile(modpath.."/crafts.lua") dofile(modpath.."/crafts.lua")
dofile(modpath.."/leafdecay.lua")
-- tree spawning setup -- tree spawning setup
@ -86,7 +89,7 @@ if moretrees.spawn_saplings then
moretrees.spawn_oak_object = "moretrees:oak_sapling_ongen" moretrees.spawn_oak_object = "moretrees:oak_sapling_ongen"
moretrees.spawn_sequoia_object = "moretrees:sequoia_sapling_ongen" moretrees.spawn_sequoia_object = "moretrees:sequoia_sapling_ongen"
moretrees.spawn_palm_object = "moretrees:palm_sapling_ongen" moretrees.spawn_palm_object = "moretrees:palm_sapling_ongen"
moretrees.spawn_cedar_object = "moretrees:cedar_sapling_ongen" moretrees.spawn_pine_object = "moretrees:pine_sapling_ongen"
moretrees.spawn_rubber_tree_object = "moretrees:rubber_tree_sapling_ongen" moretrees.spawn_rubber_tree_object = "moretrees:rubber_tree_sapling_ongen"
moretrees.spawn_willow_object = "moretrees:willow_sapling_ongen" moretrees.spawn_willow_object = "moretrees:willow_sapling_ongen"
moretrees.spawn_acacia_object = "moretrees:acacia_sapling_ongen" moretrees.spawn_acacia_object = "moretrees:acacia_sapling_ongen"
@ -101,75 +104,76 @@ else
moretrees.spawn_oak_object = moretrees.oak_model moretrees.spawn_oak_object = moretrees.oak_model
moretrees.spawn_sequoia_object = moretrees.sequoia_model moretrees.spawn_sequoia_object = moretrees.sequoia_model
moretrees.spawn_palm_object = moretrees.palm_model moretrees.spawn_palm_object = moretrees.palm_model
moretrees.spawn_cedar_object = moretrees.cedar_model moretrees.spawn_pine_object = moretrees.pine_model
moretrees.spawn_rubber_tree_object = moretrees.rubber_tree_model moretrees.spawn_rubber_tree_object = moretrees.rubber_tree_model
moretrees.spawn_willow_object = moretrees.willow_model moretrees.spawn_willow_object = moretrees.willow_model
moretrees.spawn_acacia_object = moretrees.acacia_model moretrees.spawn_acacia_object = moretrees.acacia_model
moretrees.spawn_birch_object = "moretrees.grow_birch" moretrees.spawn_birch_object = "moretrees:grow_birch"
moretrees.spawn_spruce_object = "moretrees.grow_spruce" moretrees.spawn_spruce_object = "moretrees:grow_spruce"
moretrees.spawn_jungletree_object = "moretrees.grow_jungletree" moretrees.spawn_jungletree_object = "moretrees:grow_jungletree"
moretrees.spawn_fir_object = "moretrees.grow_fir" moretrees.spawn_fir_object = "moretrees:grow_fir"
moretrees.spawn_fir_snow_object = "moretrees.grow_fir_snow" moretrees.spawn_fir_snow_object = "moretrees:grow_fir_snow"
end end
if moretrees.enable_beech then if moretrees.enable_beech then
biome_lib:register_generate_plant(moretrees.beech_biome, moretrees.spawn_beech_object) plantslib:register_generate_plant(moretrees.beech_biome, moretrees.spawn_beech_object)
end end
if moretrees.enable_apple_tree then if moretrees.enable_apple_tree then
biome_lib:register_generate_plant(moretrees.apple_tree_biome, moretrees.spawn_apple_tree_object) plantslib:register_generate_plant(moretrees.apple_tree_biome, moretrees.spawn_apple_tree_object)
end end
if moretrees.enable_oak then if moretrees.enable_oak then
biome_lib:register_generate_plant(moretrees.oak_biome, moretrees.spawn_oak_object) plantslib:register_generate_plant(moretrees.oak_biome, moretrees.spawn_oak_object)
end end
if moretrees.enable_sequoia then if moretrees.enable_sequoia then
biome_lib:register_generate_plant(moretrees.sequoia_biome, moretrees.spawn_sequoia_object) plantslib:register_generate_plant(moretrees.sequoia_biome, moretrees.spawn_sequoia_object)
end end
if moretrees.enable_palm then if moretrees.enable_palm then
biome_lib:register_generate_plant(moretrees.palm_biome, moretrees.spawn_palm_object) plantslib:register_generate_plant(moretrees.palm_biome, moretrees.spawn_palm_object)
end end
if moretrees.enable_cedar then if moretrees.enable_pine then
biome_lib:register_generate_plant(moretrees.cedar_biome, moretrees.spawn_cedar_object) plantslib:register_generate_plant(moretrees.pine_biome, moretrees.spawn_pine_object)
end end
if moretrees.enable_rubber_tree then if moretrees.enable_rubber_tree then
biome_lib:register_generate_plant(moretrees.rubber_tree_biome, moretrees.spawn_rubber_tree_object) plantslib:register_generate_plant(moretrees.rubber_tree_biome, moretrees.spawn_rubber_tree_object)
end end
if moretrees.enable_willow then if moretrees.enable_willow then
biome_lib:register_generate_plant(moretrees.willow_biome, moretrees.spawn_willow_object) plantslib:register_generate_plant(moretrees.willow_biome, moretrees.spawn_willow_object)
end end
if moretrees.enable_acacia then if moretrees.enable_acacia then
biome_lib:register_generate_plant(moretrees.acacia_biome, moretrees.spawn_acacia_object) plantslib:register_generate_plant(moretrees.acacia_biome, moretrees.spawn_acacia_object)
end end
if moretrees.enable_birch then if moretrees.enable_birch then
biome_lib:register_generate_plant(moretrees.birch_biome, moretrees.spawn_birch_object) plantslib:register_generate_plant(moretrees.birch_biome, moretrees.spawn_birch_object)
end end
if moretrees.enable_spruce then if moretrees.enable_spruce then
biome_lib:register_generate_plant(moretrees.spruce_biome, moretrees.spawn_spruce_object) plantslib:register_generate_plant(moretrees.spruce_biome, moretrees.spawn_spruce_object)
end end
if moretrees.enable_jungle_tree then if moretrees.enable_jungle_tree then
biome_lib:register_generate_plant(moretrees.jungletree_biome, moretrees.spawn_jungletree_object) plantslib:register_generate_plant(moretrees.jungletree_biome, moretrees.spawn_jungletree_object)
end end
if moretrees.enable_fir then if moretrees.enable_fir then
biome_lib:register_generate_plant(moretrees.fir_biome, moretrees.spawn_fir_object) plantslib:register_generate_plant(moretrees.fir_biome, moretrees.spawn_fir_object)
if minetest.get_modpath("snow") then if minetest.get_modpath("snow") then
biome_lib:register_generate_plant(moretrees.fir_biome_snow, moretrees.spawn_fir_snow_object) plantslib:register_generate_plant(moretrees.fir_biome_snow, moretrees.spawn_fir_snow_object)
end end
end end
-- Code to spawn a birch tree -- Code to spawn a birch tree
function moretrees.grow_birch(pos) function moretrees:grow_birch(pos)
minetest.remove_node(pos) minetest.remove_node(pos)
if math.random(1,2) == 1 then if math.random(1,2) == 1 then
minetest.spawn_tree(pos, moretrees.birch_model1) minetest.spawn_tree(pos, moretrees.birch_model1)
@ -180,7 +184,7 @@ end
-- Code to spawn a spruce tree -- Code to spawn a spruce tree
function moretrees.grow_spruce(pos) function moretrees:grow_spruce(pos)
minetest.remove_node(pos) minetest.remove_node(pos)
if math.random(1,2) == 1 then if math.random(1,2) == 1 then
minetest.spawn_tree(pos, moretrees.spruce_model1) minetest.spawn_tree(pos, moretrees.spruce_model1)
@ -205,12 +209,12 @@ moretrees.ct_rules_b1 = "[-FBf][+FBf]"
moretrees.ct_rules_a2 = "FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A" moretrees.ct_rules_a2 = "FF[FF][&&-FBF][&&+FBF][&&---FBF][&&+++FBF]F/A"
moretrees.ct_rules_b2 = "[-fB][+fB]" moretrees.ct_rules_b2 = "[-fB][+fB]"
function moretrees.grow_jungletree(pos) function moretrees:grow_jungletree(pos)
local r1 = math.random(2) local r1 = math.random(2)
local r2 = math.random(3) local r2 = math.random(3)
if r1 == 1 then if r1 == 1 then
moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_red" moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_red"
else else
moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_yellow" moretrees.jungletree_model.leaves2 = "moretrees:jungletree_leaves_yellow"
end end
moretrees.jungletree_model.leaves2_chance = math.random(25, 75) moretrees.jungletree_model.leaves2_chance = math.random(25, 75)
@ -235,6 +239,8 @@ function moretrees.grow_jungletree(pos)
moretrees.jungletree_model.rules_b = moretrees.jt_rules_b2 moretrees.jungletree_model.rules_b = moretrees.jt_rules_b2
end end
moretrees.jungletree_model.enable_unique_ids = true
minetest.remove_node(pos) minetest.remove_node(pos)
local leaves = minetest.find_nodes_in_area({x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y+10, z = pos.z+1}, "default:leaves") local leaves = minetest.find_nodes_in_area({x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y+10, z = pos.z+1}, "default:leaves")
for leaf in ipairs(leaves) do for leaf in ipairs(leaves) do
@ -245,7 +251,7 @@ end
-- code to spawn fir trees -- code to spawn fir trees
function moretrees.grow_fir(pos) function moretrees:grow_fir(pos)
if math.random(2) == 1 then if math.random(2) == 1 then
moretrees.fir_model.leaves="moretrees:fir_leaves" moretrees.fir_model.leaves="moretrees:fir_leaves"
else else
@ -259,6 +265,7 @@ function moretrees.grow_fir(pos)
moretrees.fir_model.rules_b = moretrees.ct_rules_b2 moretrees.fir_model.rules_b = moretrees.ct_rules_b2
end end
moretrees.fir_model.enable_unique_ids = true
moretrees.fir_model.iterations = 7 moretrees.fir_model.iterations = 7
moretrees.fir_model.random_level = 5 moretrees.fir_model.random_level = 5
@ -272,7 +279,7 @@ end
-- same thing, but a smaller version that grows only in snow biomes -- same thing, but a smaller version that grows only in snow biomes
function moretrees.grow_fir_snow(pos) function moretrees:grow_fir_snow(pos)
if math.random(2) == 1 then if math.random(2) == 1 then
moretrees.fir_model.leaves="moretrees:fir_leaves" moretrees.fir_model.leaves="moretrees:fir_leaves"
else else
@ -286,6 +293,7 @@ function moretrees.grow_fir_snow(pos)
moretrees.fir_model.rules_b = moretrees.ct_rules_b2 moretrees.fir_model.rules_b = moretrees.ct_rules_b2
end end
moretrees.fir_model.enable_unique_ids = true
moretrees.fir_model.iterations = 2 moretrees.fir_model.iterations = 2
moretrees.fir_model.random_level = 2 moretrees.fir_model.random_level = 2
@ -297,4 +305,8 @@ function moretrees.grow_fir_snow(pos)
minetest.spawn_tree(pos,moretrees.fir_model) minetest.spawn_tree(pos,moretrees.fir_model)
end end
minetest.log("action", S("[Moretrees] Loaded (2013-02-11)")) minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
print(dump(node.name)..": param1 = "..dump(node.param1)..", param2 = "..dump(node.param2))
end)
print(S("[Moretrees] Loaded (2013-02-11)"))

117
leafdecay.lua Normal file
View File

@ -0,0 +1,117 @@
-- leaf decay
-- this function is based on the default leafdecay code
local process_drops = function(pos, name)
local drops = minetest.get_node_drops(name)
for _,dropitem in ipairs(drops) do
if dropitem ~= name
or (string.find(name, "leaves") and moretrees.decay_leaves_as_items) then
local newpos = {
x=pos.x + math.random() - 0.5,
y=pos.y + math.random() - 0.5,
z=pos.z + math.random() - 0.5
}
minetest.add_item(newpos, dropitem)
end
end
end
if moretrees.enable_leafdecay then
for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1]
if treename ~= "jungletree" and treename ~= "fir" and treename ~= "palm" then
minetest.register_abm({
nodenames = "moretrees:"..treename.."_leaves",
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.leafdecay_radius, { "ignore", "moretrees:"..treename.."_trunk" }) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end
end
minetest.register_abm({
nodenames = {"moretrees:jungletree_leaves_red","moretrees:jungletree_leaves_green","moretrees:jungletree_leaves_yellow"},
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.leafdecay_radius, {"ignore", "default:jungletree", "moretrees:jungletree_trunk"}) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
minetest.register_abm({
nodenames = {"moretrees:fir_leaves", "moretrees:fir_leaves_bright"},
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.leafdecay_radius, { "ignore", "moretrees:fir_trunk" }) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
minetest.register_abm({
nodenames = "moretrees:palm_leaves",
interval = moretrees.leafdecay_delay,
chance = moretrees.leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.palm_leafdecay_radius, { "ignore", "moretrees:palm_trunk" }) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end
if moretrees.enable_default_leafdecay then
minetest.register_abm({
nodenames = "default:leaves",
interval = moretrees.default_leafdecay_delay,
chance = moretrees.default_leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.default_leafdecay_radius, { "ignore", "default:tree" }) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end
-- Decay apple tree blossoms from nature_classic mod
if minetest.get_modpath("nature_classic") then
minetest.register_abm({
nodenames = "moretrees:apple_blossoms",
interval = moretrees.default_leafdecay_delay,
chance = moretrees.default_leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.leafdecay_radius, { "ignore", "moretrees:apple_tree_trunk" }) then return end
process_drops(pos, "moretrees:apple_tree_leaves")
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end
if moretrees.enable_default_jungle_leafdecay then
minetest.register_abm({
nodenames = "default:jungleleaves",
interval = moretrees.default_jungle_leafdecay_delay,
chance = moretrees.default_jungle_leafdecay_chance,
action = function(pos, node, active_object_count, active_object_count_wider)
if minetest.find_node_near(pos, moretrees.default_jungle_leafdecay_radius, { "ignore", "default:jungletree" }) then return end
process_drops(pos, node.name)
minetest.remove_node(pos)
nodeupdate(pos)
end
})
end

1
locale/de.txt Executable file → Normal file
View File

@ -65,6 +65,7 @@ Spruce Cone = Fichtenzapfen
Pine Cone = Kiefernzapfen Pine Cone = Kiefernzapfen
Fir Cone = Tannenzapfen Fir Cone = Tannenzapfen
Jungle Sapling = Tropenbaumsetzling Jungle Sapling = Tropenbaumsetzling
Jungle Tree Leaves (Green) = Tropenbaumlaub (gruen)
Jungle Tree Leaves (Yellow) = Tropenbaumlaub (gelb) Jungle Tree Leaves (Yellow) = Tropenbaumlaub (gelb)
Jungle Tree Leaves (Red) = Tropenbaumlaub (rot) Jungle Tree Leaves (Red) = Tropenbaumlaub (rot)
Douglas Fir Leaves (Bright) = Douglasiennadeln (breit) Douglas Fir Leaves (Bright) = Douglasiennadeln (breit)

1
locale/template.txt Executable file → Normal file
View File

@ -65,6 +65,7 @@ Spruce Cone =
Pine Cone = Pine Cone =
Fir Cone = Fir Cone =
Jungle Sapling = Jungle Sapling =
Jungle Tree Leaves (Green) =
Jungle Tree Leaves (Yellow) = Jungle Tree Leaves (Yellow) =
Jungle Tree Leaves (Red) = Jungle Tree Leaves (Red) =
Douglas Fir Leaves (Bright) = Douglas Fir Leaves (Bright) =

View File

@ -1 +0,0 @@
name = moretrees

305
node_defs.lua Executable file → Normal file
View File

@ -1,22 +1,21 @@
local S = moretrees.intllib local S = moretrees.intllib
moretrees.avoidnodes = {} moretrees.avoidnodes = {}
moretrees.treelist = { moretrees.treelist = {
{"beech", "Beech Tree"}, {"beech", "Beech Tree"},
{"apple_tree", "Apple Tree"}, {"apple_tree", "Apple Tree"},
{"oak", "Oak Tree", "acorn", "Acorn", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"oak", "Oak Tree", "acorn", "Acorn", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"sequoia", "Giant Sequoia"}, {"sequoia", "Giant Sequoia"},
{"birch", "Birch Tree"}, {"birch", "Birch Tree"},
{"palm", "Palm Tree", "coconut", "Coconut", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 1.0 }, {"palm", "Palm Tree", "coconut", "Coconut", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 1.0 },
{"spruce", "Spruce Tree", "spruce_cone", "Spruce Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"spruce", "Spruce Tree", "spruce_cone", "Spruce Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"cedar", "Cedar Tree", "cedar_cone", "Cedar Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"pine", "Pine Tree", "pine_cone", "Pine Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"willow", "Willow Tree"}, {"willow", "Willow Tree"},
{"acacia", "Acacia Tree"},
{"rubber_tree", "Rubber Tree"}, {"rubber_tree", "Rubber Tree"},
{"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"jungletree", "Jungle Tree"},
{"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"jungletree", "Jungle Tree", nil, nil, nil, nil, "default_junglesapling.png" },
{"acacia", "Acacia Tree", nil, nil, nil, nil, "default_acacia_sapling.png" },
} }
local dirs1 = { 21, 20, 23, 22, 21 } local dirs1 = { 21, 20, 23, 22, 21 }
@ -26,13 +25,18 @@ local dirs3 = { 14, 11, 16, 5, 14 }
local moretrees_new_leaves_drawtype = "allfaces_optional" local moretrees_new_leaves_drawtype = "allfaces_optional"
local moretrees_plantlike_leaves_visual_scale = 1 local moretrees_plantlike_leaves_visual_scale = 1
if moretrees.plantlike_leaves then if moretrees.plantlike_leaves then
moretrees_new_leaves_drawtype = "plantlike" moretrees_new_leaves_drawtype = "plantlike"
moretrees_plantlike_leaves_visual_scale = 1.189 moretrees_plantlike_leaves_visual_scale = 1.189
end end
-- redefine default leaves to handle plantlike and/or leaf decay options -- redefine default leaves to handle plantlike and/or leaf decay options
if moretrees.enable_default_leafdecay then
minetest.override_item("default:leaves", {
groups = { snappy = 3, flammable = 2, leaves = 1 }
})
end
if moretrees.plantlike_leaves then if moretrees.plantlike_leaves then
minetest.override_item("default:leaves", { minetest.override_item("default:leaves", {
inventory_image = minetest.inventorycube("default_leaves.png"), inventory_image = minetest.inventorycube("default_leaves.png"),
@ -47,6 +51,11 @@ end
-- redefine default jungle leaves for same -- redefine default jungle leaves for same
if moretrees.enable_default_leafdecay then
minetest.override_item("default:jungleleaves", {
groups = { snappy = 3, flammable = 2, leaves = 1 }
})
end
if moretrees.plantlike_leaves then if moretrees.plantlike_leaves then
minetest.override_item("default:jungleleaves", { minetest.override_item("default:jungleleaves", {
inventory_image = minetest.inventorycube("default_jungleleaves.png"), inventory_image = minetest.inventorycube("default_jungleleaves.png"),
@ -67,13 +76,7 @@ for i in ipairs(moretrees.treelist) do
local selbox = moretrees.treelist[i][5] local selbox = moretrees.treelist[i][5]
local vscale = moretrees.treelist[i][6] local vscale = moretrees.treelist[i][6]
local saptex = moretrees.treelist[i][7] if treename ~= "jungletree" then -- the default game provides jungle tree trunk/planks nodes.
if treename ~= "jungletree" -- the default game provides jungle tree, acacia, and pine trunk/planks nodes.
and treename ~= "acacia"
and treename ~= "pine" then
saptex = "moretrees_"..treename.."_sapling.png"
minetest.register_node("moretrees:"..treename.."_trunk", { minetest.register_node("moretrees:"..treename.."_trunk", {
description = S(treedesc.." Trunk"), description = S(treedesc.." Trunk"),
@ -100,10 +103,9 @@ for i in ipairs(moretrees.treelist) do
minetest.register_node("moretrees:"..treename.."_sapling", { minetest.register_node("moretrees:"..treename.."_sapling", {
description = S(treedesc.." Sapling"), description = S(treedesc.." Sapling"),
drawtype = "plantlike", drawtype = "plantlike",
tiles = {saptex}, tiles = {"moretrees_"..treename.."_sapling.png"},
inventory_image = saptex, inventory_image = "moretrees_"..treename.."_sapling.png",
paramtype = "light", paramtype = "light",
paramtype2 = "waving",
walkable = false, walkable = false,
selection_box = { selection_box = {
type = "fixed", type = "fixed",
@ -112,17 +114,32 @@ for i in ipairs(moretrees.treelist) do
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1}, groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
sounds = default.node_sound_defaults(), sounds = default.node_sound_defaults(),
}) })
minetest.register_node("moretrees:"..treename.."_sapling_ongen", {
description = S(treedesc.." Sapling"),
drawtype = "plantlike",
tiles = {"moretrees_"..treename.."_sapling.png"},
inventory_image = "moretrees_"..treename.."_sapling.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,not_in_creative_inventory=1,sapling=1},
sounds = default.node_sound_defaults(),
drop = "moretrees:"..treename.."_sapling"
})
-- player will get a sapling with 1/100 chance -- player will get a sapling with 1/100 chance
-- player will get leaves only if he/she gets no saplings, -- player will get leaves only if he/she gets no saplings,
-- this is because max_items is 1 -- this is because max_items is 1
local droprarity = 100 local droprarity = 100
local decay = moretrees.leafdecay_radius
if treename == "palm" then if treename == "palm" then
droprarity = 20 droprarity = 20
decay = moretrees.palm_leafdecay_radius
end end
local moretrees_leaves_inventory_image = nil local moretrees_leaves_inventory_image = nil
@ -142,7 +159,7 @@ for i in ipairs(moretrees.treelist) do
tiles = { "moretrees_"..treename.."_leaves.png" }, tiles = { "moretrees_"..treename.."_leaves.png" },
inventory_image = moretrees_leaves_inventory_image, inventory_image = moretrees_leaves_inventory_image,
paramtype = "light", paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = decay}, groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
drop = { drop = {
@ -154,83 +171,40 @@ for i in ipairs(moretrees.treelist) do
}, },
}) })
if moretrees.enable_stairs then if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
if minetest.get_modpath("moreblocks") then
-- stairsplus:register_all(modname, subname, recipeitem, {fields}) -- stairsplus:register_all(modname, subname, recipeitem, {fields})
stairsplus:register_all( stairsplus:register_all(
"moretrees", "moretrees",
treename.."_trunk", treename.."_trunk",
"moretrees:"..treename.."_trunk", "moretrees:"..treename.."_trunk",
{ {
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 }, groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = { tiles = {
"moretrees_"..treename.."_trunk_top.png", "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png"
},
description = S(treedesc.." Trunk"),
drop = treename.."_trunk",
}
)
stairsplus:register_all(
"moretrees",
treename.."_planks",
"moretrees:"..treename.."_planks",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
tiles = { "moretrees_"..treename.."_wood.png" },
description = S(treedesc.." Planks"),
drop = treename.."_planks",
}
)
elseif minetest.get_modpath("stairs") then
stairs.register_stair_and_slab(
"moretrees_"..treename.."_trunk",
"moretrees:"..treename.."_trunk",
{ snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2 },
{ "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk_top.png", "moretrees_"..treename.."_trunk_top.png",
"moretrees_"..treename.."_trunk.png" "moretrees_"..treename.."_trunk.png"
}, },
S(treedesc.." Trunk Stair"), description = S(treedesc.." Trunk"),
S(treedesc.." Trunk Slab"), drop = treename.."_trunk",
default.node_sound_wood_defaults() }
) )
stairs.register_stair_and_slab( stairsplus:register_all(
"moretrees_"..treename.."_planks", "moretrees",
"moretrees:"..treename.."_planks", treename.."_planks",
{ snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 }, "moretrees:"..treename.."_planks",
{ "moretrees_"..treename.."_wood.png" }, {
S(treedesc.." Planks Stair"), groups = { snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1 },
S(treedesc.." Planks Slab"), tiles = { "moretrees_"..treename.."_wood.png" },
default.node_sound_wood_defaults() description = S(treedesc.." Planks"),
) drop = treename.."_planks",
}
end )
end end
end end
minetest.register_node("moretrees:"..treename.."_sapling_ongen", {
description = S(treedesc.." Sapling"),
drawtype = "plantlike",
tiles = {saptex},
inventory_image = saptex,
paramtype = "light",
paramtype2 = "waving",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,not_in_creative_inventory=1,sapling=1},
sounds = default.node_sound_defaults(),
drop = "moretrees:"..treename.."_sapling"
})
if fruit then if fruit then
minetest.register_node("moretrees:"..fruit, { minetest.register_node("moretrees:"..fruit, {
description = S(fruitdesc), description = S(fruitdesc),
@ -239,9 +213,8 @@ for i in ipairs(moretrees.treelist) do
inventory_image = "moretrees_"..fruit..".png^[transformR180", inventory_image = "moretrees_"..fruit..".png^[transformR180",
wield_image = "moretrees_"..fruit..".png^[transformR180", wield_image = "moretrees_"..fruit..".png^[transformR180",
visual_scale = vscale, visual_scale = vscale,
paramtype = "light",
sunlight_propagates = true,
walkable = false, walkable = false,
paramtype = "light",
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = selbox fixed = selbox
@ -257,7 +230,7 @@ for i in ipairs(moretrees.treelist) do
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0 local fdir = node.param2 or 0
local nfdir = dirs2[fdir+1] nfdir = dirs2[fdir+1]
minetest.add_node(pos, {name = "moretrees:"..treename.."_trunk", param2 = nfdir}) minetest.add_node(pos, {name = "moretrees:"..treename.."_trunk", param2 = nfdir})
end, end,
}) })
@ -265,16 +238,51 @@ for i in ipairs(moretrees.treelist) do
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk") table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
if moretrees.spawn_saplings then if moretrees.spawn_saplings then
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling") table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling")
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen") table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen")
end end
end end
-- Extra nodes for jungle trees: -- Extra nodes for jungle trees:
local jungleleaves = {"yellow","red"} minetest.register_node("moretrees:jungletree_sapling", {
local jungleleavesnames = {"Yellow", "Red"} description = S("Jungle Sapling"),
for color = 1, #jungleleaves do drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
wield_image = "default_junglesapling.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("moretrees:jungletree_sapling_ongen", {
description = S("Jungle Sapling"),
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
wield_image = "default_junglesapling.png",
paramtype = "light",
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
},
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,not_in_creative_inventory=1,sapling=1},
sounds = default.node_sound_leaves_defaults(),
drop = "moretrees:jungletree_sapling"
})
local jungleleaves = {"green","yellow","red"}
local jungleleavesnames = {"Green", "Yellow", "Red"}
for color = 1, 3 do
local leave_name = "moretrees:jungletree_leaves_"..jungleleaves[color] local leave_name = "moretrees:jungletree_leaves_"..jungleleaves[color]
local moretrees_leaves_inventory_image = nil local moretrees_leaves_inventory_image = nil
@ -293,11 +301,11 @@ for color = 1, #jungleleaves do
tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..".png"}, tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..".png"},
inventory_image = moretrees_leaves_inventory_image, inventory_image = moretrees_leaves_inventory_image,
paramtype = "light", paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius }, groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
{items = {"default:junglesapling"}, rarity = 100 }, {items = {'moretrees:jungletree_sapling'}, rarity = 100 },
{items = {"moretrees:jungletree_leaves_"..jungleleaves[color]} } {items = {"moretrees:jungletree_leaves_"..jungleleaves[color]} }
} }
}, },
@ -321,7 +329,7 @@ minetest.register_node("moretrees:fir_leaves_bright", {
tiles = { "moretrees_fir_leaves_bright.png" }, tiles = { "moretrees_fir_leaves_bright.png" },
inventory_image = moretrees_leaves_inventory_image, inventory_image = moretrees_leaves_inventory_image,
paramtype = "light", paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius }, groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 },
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {
@ -333,22 +341,21 @@ minetest.register_node("moretrees:fir_leaves_bright", {
}) })
if moretrees.enable_redefine_apple then if moretrees.enable_redefine_apple then
local appledef = moretrees.clone_node("default:apple") minetest.override_item("default:apple",
appledef.groups.attached_node = 1 {groups = { fleshy=3, dig_immediate=3, flammable=2, leafdecay=3, leafdecay_drop=1, attached_node = 1}
minetest.register_node(":default:apple", appledef) })
end end
table.insert(moretrees.avoidnodes, "default:jungletree") table.insert(moretrees.avoidnodes, "default:jungletree")
table.insert(moretrees.avoidnodes, "default:pine_tree") table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
table.insert(moretrees.avoidnodes, "default:acacia_tree")
table.insert(moretrees.avoidnodes, "moretrees:fir_trunk") table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
table.insert(moretrees.avoidnodes, "default:tree") table.insert(moretrees.avoidnodes, "default:tree")
if moretrees.spawn_saplings then if moretrees.spawn_saplings then
table.insert(moretrees.avoidnodes, "snow:sapling_pine") table.insert(moretrees.avoidnodes, "snow:sapling_pine")
table.insert(moretrees.avoidnodes, "default:junglesapling") table.insert(moretrees.avoidnodes, "default:junglesapling")
table.insert(moretrees.avoidnodes, "default:pine_sapling") table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling")
table.insert(moretrees.avoidnodes, "default:acacia_sapling") table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling_ongen")
end end
-- "empty" (tapped) rubber tree nodes -- "empty" (tapped) rubber tree nodes
@ -378,60 +385,38 @@ minetest.register_abm({
end, end,
}) })
-- To get Moretrees to generate its own jungle trees among the default mapgen -- For compatibility with old nodes and recently-changed nodes.
-- we need our own copy of that node, which moretrees will match against.
local jungle_tree = moretrees.clone_node("default:jungletree") minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
jungle_tree.drop = jungle_tree.drop or { items = {} } minetest.register_alias("farming_plus:rubber_tree_full", "moretrees:rubber_tree_trunk")
table.insert(jungle_tree.drop.items, { items = {"default:jungletree"}}) minetest.register_alias("farming:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
-- For compatibility with old nodes, recently-changed nodes, and default nodes minetest.register_alias("technic:rubber_leaves", "moretrees:rubber_tree_leaves")
minetest.register_alias("farming_plus:rubber_leaves", "moretrees:rubber_tree_leaves")
minetest.register_alias("farming:rubber_leaves", "moretrees:rubber_tree_leaves")
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk") minetest.register_alias("technic:rubber_tree_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming_plus:rubber_tree_full", "moretrees:rubber_tree_trunk") minetest.register_alias("farming_plus:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming:rubber_tree_full", "moretrees:rubber_tree_trunk") minetest.register_alias("farming:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("technic:rubber_leaves", "moretrees:rubber_tree_leaves") minetest.register_alias("default:junglesapling","moretrees:jungletree_sapling")
minetest.register_alias("farming_plus:rubber_leaves", "moretrees:rubber_tree_leaves") minetest.register_alias("moretrees:jungletree_trunk_sideways", "moreblocks:horizontal_jungle_tree")
minetest.register_alias("farming:rubber_leaves", "moretrees:rubber_tree_leaves") minetest.register_alias("moretrees:jungletree_trunk", "default:jungletree")
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
minetest.register_alias("technic:rubber_tree_sapling", "moretrees:rubber_tree_sapling") minetest.register_alias("jungletree:leaves_green", "moretrees:jungletree_leaves_green")
minetest.register_alias("farming_plus:rubber_sapling", "moretrees:rubber_tree_sapling") minetest.register_alias("jungletree:leaves_red", "moretrees:jungletree_leaves_red")
minetest.register_alias("farming:rubber_sapling", "moretrees:rubber_tree_sapling") minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
minetest.register_alias("moretrees:conifer_trunk", "moretrees:fir_trunk") minetest.register_alias("moretrees:conifer_trunk", "moretrees:fir_trunk")
minetest.register_alias("moretrees:conifer_trunk_sideways", "moretrees:fir_trunk_sideways") minetest.register_alias("moretrees:conifer_trunk_sideways", "moretrees:fir_trunk_sideways")
minetest.register_alias("moretrees:conifer_leaves", "moretrees:fir_leaves") minetest.register_alias("moretrees:conifer_leaves", "moretrees:fir_leaves")
minetest.register_alias("moretrees:conifer_leaves_bright", "moretrees:fir_leaves_bright") minetest.register_alias("moretrees:conifer_leaves_bright", "moretrees:fir_leaves_bright")
minetest.register_alias("moretrees:conifer_sapling", "moretrees:fir_sapling") minetest.register_alias("moretrees:conifer_sapling", "moretrees:fir_sapling")
minetest.register_alias("conifers:trunk", "moretrees:fir_trunk") minetest.register_alias("conifers:trunk", "moretrees:fir_trunk")
minetest.register_alias("conifers:trunk_reversed", "moretrees:fir_trunk_sideways") minetest.register_alias("conifers:trunk_reversed", "moretrees:fir_trunk_sideways")
minetest.register_alias("conifers:leaves", "moretrees:fir_leaves") minetest.register_alias("conifers:leaves", "moretrees:fir_leaves")
minetest.register_alias("conifers:leaves_special", "moretrees:fir_leaves_bright") minetest.register_alias("conifers:leaves_special", "moretrees:fir_leaves_bright")
minetest.register_alias("conifers:sapling", "moretrees:fir_sapling") minetest.register_alias("conifers:sapling", "moretrees:fir_sapling")
minetest.register_alias("moretrees:jungletree_sapling", "default:junglesapling")
minetest.register_alias("moretrees:jungletree_trunk_sideways", "moreblocks:horizontal_jungle_tree")
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
minetest.register_alias("moretrees:jungletree_leaves_green", "default:jungleleaves")
minetest.register_alias("jungletree:leaves_green", "default:jungleleaves")
minetest.register_alias("jungletree:leaves_red", "moretrees:jungletree_leaves_red")
minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
minetest.register_alias("moretrees:acacia_trunk", "default:acacia_tree")
minetest.register_alias("moretrees:acacia_planks", "default:acacia_wood")
minetest.register_alias("moretrees:acacia_sapling", "default:acacia_sapling")
minetest.register_alias("moretrees:acacia_leaves", "default:acacia_leaves")
minetest.register_alias("moretrees:pine_trunk", "moretrees:cedar_trunk")
minetest.register_alias("moretrees:pine_planks", "moretrees:cedar_planks")
minetest.register_alias("moretrees:pine_sapling", "moretrees:cedar_sapling")
minetest.register_alias("moretrees:pine_leaves", "moretrees:cedar_leaves")
minetest.register_alias("moretrees:pine_cone", "moretrees:cedar_cone")
minetest.register_alias("moretrees:pine_nuts", "moretrees:cedar_nuts")
-- Overriding moretrees' palm leaves:
minetest.override_item("moretrees:palm_leaves",{walkable = false})

40
saplings.lua Executable file → Normal file
View File

@ -7,8 +7,8 @@ for i in ipairs(moretrees.treelist) do
if treename ~= "birch" and treename ~= "spruce" and treename ~= "fir" and treename ~= "jungletree" then if treename ~= "birch" and treename ~= "spruce" and treename ~= "fir" and treename ~= "jungletree" then
biome_lib:dbg(dump(moretrees[tree_biome].surface)) plantslib:dbg(dump(moretrees[tree_biome].surface))
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = moretrees.sapling_interval, grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance, grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:"..treename.."_sapling", grow_plant = "moretrees:"..treename.."_sapling",
@ -16,7 +16,7 @@ for i in ipairs(moretrees.treelist) do
grow_function = moretrees[tree_model], grow_function = moretrees[tree_model],
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = 2, grow_delay = 2,
grow_chance = 30, grow_chance = 30,
grow_plant = "moretrees:"..treename.."_sapling_ongen", grow_plant = "moretrees:"..treename.."_sapling_ongen",
@ -27,67 +27,67 @@ for i in ipairs(moretrees.treelist) do
end end
end end
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = moretrees.sapling_interval, grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance, grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:birch_sapling", grow_plant = "moretrees:birch_sapling",
grow_nodes = moretrees.birch_biome.surface, grow_nodes = moretrees.birch_biome.surface,
grow_function = "moretrees.grow_birch" grow_function = "moretrees:grow_birch"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = 2, grow_delay = 2,
grow_chance = 30, grow_chance = 30,
grow_plant = "moretrees:birch_sapling_ongen", grow_plant = "moretrees:birch_sapling_ongen",
grow_nodes = moretrees.birch_biome.surface, grow_nodes = moretrees.birch_biome.surface,
grow_function = "moretrees.grow_birch" grow_function = "moretrees:grow_birch"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = moretrees.sapling_interval, grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance, grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:spruce_sapling", grow_plant = "moretrees:spruce_sapling",
grow_nodes = moretrees.spruce_biome.surface, grow_nodes = moretrees.spruce_biome.surface,
grow_function = "moretrees.grow_spruce" grow_function = "moretrees:grow_spruce"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = 2, grow_delay = 2,
grow_chance = 30, grow_chance = 30,
grow_plant = "moretrees:spruce_sapling_ongen", grow_plant = "moretrees:spruce_sapling_ongen",
grow_nodes = moretrees.spruce_biome.surface, grow_nodes = moretrees.spruce_biome.surface,
grow_function = "moretrees.grow_spruce" grow_function = "moretrees:grow_spruce"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = moretrees.sapling_interval, grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance, grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:fir_sapling", grow_plant = "moretrees:fir_sapling",
grow_nodes = moretrees.fir_biome.surface, grow_nodes = moretrees.fir_biome.surface,
grow_function = "moretrees.grow_fir" grow_function = "moretrees:grow_fir"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = 2, grow_delay = 2,
grow_chance = 30, grow_chance = 30,
grow_plant = "moretrees:fir_sapling_ongen", grow_plant = "moretrees:fir_sapling_ongen",
grow_nodes = moretrees.fir_biome.surface, grow_nodes = moretrees.fir_biome.surface,
grow_function = "moretrees.grow_fir" grow_function = "moretrees:grow_fir"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = moretrees.sapling_interval, grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance, grow_chance = moretrees.sapling_chance,
grow_plant = "default:junglesapling", grow_plant = "moretrees:jungletree_sapling",
grow_nodes = moretrees.jungletree_biome.surface, grow_nodes = moretrees.jungletree_biome.surface,
grow_function = "moretrees.grow_jungletree" grow_function = "moretrees:grow_jungletree"
}) })
biome_lib:grow_plants({ plantslib:grow_plants({
grow_delay = 2, grow_delay = 2,
grow_chance = 30, grow_chance = 30,
grow_plant = "moretrees:jungletree_sapling_ongen", grow_plant = "moretrees:jungletree_sapling_ongen",
grow_nodes = moretrees.jungletree_biome.surface, grow_nodes = moretrees.jungletree_biome.surface,
grow_function = "moretrees.grow_jungletree" grow_function = "moretrees:grow_jungletree"
}) })

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

BIN
textures/moretrees_acorn.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 417 B

BIN
textures/moretrees_acorn_muffin.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 782 B

BIN
textures/moretrees_acorn_muffin_batter.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 619 B

0
textures/moretrees_apple_tree_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

BIN
textures/moretrees_apple_tree_sapling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 183 B

0
textures/moretrees_apple_tree_trunk.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

0
textures/moretrees_apple_tree_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

0
textures/moretrees_apple_tree_wood.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

0
textures/moretrees_beech_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/moretrees_beech_sapling.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

BIN
textures/moretrees_beech_trunk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 980 B

0
textures/moretrees_beech_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

BIN
textures/moretrees_beech_wood.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 175 B

0
textures/moretrees_birch_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 459 B

BIN
textures/moretrees_birch_sapling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 208 B

BIN
textures/moretrees_birch_trunk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 975 B

0
textures/moretrees_birch_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 811 B

0
textures/moretrees_birch_wood.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

0
textures/moretrees_coconut.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 963 B

BIN
textures/moretrees_coconut_milk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 227 B

0
textures/moretrees_coconut_milk_inv.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

BIN
textures/moretrees_fir_cone.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 244 B

0
textures/moretrees_fir_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

0
textures/moretrees_fir_leaves_bright.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

0
textures/moretrees_fir_nuts.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

BIN
textures/moretrees_fir_sapling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 166 B

0
textures/moretrees_fir_trunk.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

0
textures/moretrees_fir_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 924 B

After

Width:  |  Height:  |  Size: 924 B

BIN
textures/moretrees_fir_wood.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

0
textures/moretrees_jungletree_leaves_green.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/moretrees_jungletree_leaves_red.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/moretrees_jungletree_leaves_yellow.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/moretrees_oak_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 730 B

After

Width:  |  Height:  |  Size: 730 B

0
textures/moretrees_oak_sapling.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 172 B

BIN
textures/moretrees_oak_trunk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 998 B

0
textures/moretrees_oak_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

BIN
textures/moretrees_oak_wood.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 618 B

BIN
textures/moretrees_palm_leaves.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 918 B

0
textures/moretrees_palm_sapling.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

0
textures/moretrees_palm_trunk.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

0
textures/moretrees_palm_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 400 B

BIN
textures/moretrees_palm_wood.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 598 B

View File

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 315 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 369 B

View File

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 451 B

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

0
textures/moretrees_raw_coconut.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 466 B

0
textures/moretrees_rubber_tree_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

0
textures/moretrees_rubber_tree_sapling.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

0
textures/moretrees_rubber_tree_trunk.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

BIN
textures/moretrees_rubber_tree_trunk_empty.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
textures/moretrees_rubber_tree_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 534 B

0
textures/moretrees_rubber_tree_wood.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

0
textures/moretrees_sequoia_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

BIN
textures/moretrees_sequoia_sapling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 209 B

BIN
textures/moretrees_sequoia_trunk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 621 B

0
textures/moretrees_sequoia_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 594 B

BIN
textures/moretrees_sequoia_wood.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1021 B

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
textures/moretrees_spruce_cone.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 496 B

0
textures/moretrees_spruce_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

0
textures/moretrees_spruce_nuts.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

BIN
textures/moretrees_spruce_sapling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 153 B

0
textures/moretrees_spruce_trunk.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

0
textures/moretrees_spruce_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

0
textures/moretrees_spruce_wood.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 536 B

0
textures/moretrees_willow_leaves.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 409 B

0
textures/moretrees_willow_sapling.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

BIN
textures/moretrees_willow_trunk.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 630 B

0
textures/moretrees_willow_trunk_top.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

0
textures/moretrees_willow_wood.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 565 B

5
tree_biomes.txt Executable file → Normal file
View File

@ -11,7 +11,7 @@ oak 0 to +10 + 4 to +16 n/a n/a dirt_with grass 332 15
sequoia 0 to +10 -30 to +50 n/a n/a dirt_with grass 333 10 sequoia 0 to +10 -30 to +50 n/a n/a dirt_with grass 333 10
birch +10 to +15 -20 to +10 n/a n/a dirt_with grass 334 5 birch +10 to +15 -20 to +10 n/a n/a dirt_with grass 334 5
spruce above +20 -20 to +10 n/a n/a dirt_with grass 335 10 spruce above +20 -20 to +10 n/a n/a dirt_with grass 335 10
cedar n/a n/a water, 15 5 dirt_with grass 336 10 pine n/a n/a water, 15 5 dirt_with grass 336 10
willow - 5 to + 5 n/a water, 15 5 dirt_with grass 337 20 willow - 5 to + 5 n/a water, 15 5 dirt_with grass 337 20
acacia n/a n/a n/a n/a dirt_with_grass, acacia n/a n/a n/a n/a dirt_with_grass,
desert_sand n/a 15 desert_sand n/a 15
@ -32,6 +32,3 @@ where the humidity is low (but not bone dry).
Fir trees appear in a snow biome only with older versions of SPlizard's Snow Biomes mod. In more recent versions, Fir trees appear in a snow biome only with older versions of SPlizard's Snow Biomes mod. In more recent versions,
these trees will not grow, due to an engine bug. these trees will not grow, due to an engine bug.
Cedar trees replace, and are identical to, the original pine trees, as the minetest default game now has (a completely
different type of) pine trees.

55
tree_models.lua Executable file → Normal file
View File

@ -10,7 +10,8 @@ moretrees.beech_model={
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="single", trunk_type="single",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.apple_tree_model={ moretrees.apple_tree_model={
@ -26,6 +27,7 @@ moretrees.apple_tree_model={
thin_branches=true, thin_branches=true,
fruit="default:apple", fruit="default:apple",
fruit_chance=15, fruit_chance=15,
enable_unique_ids = true,
} }
moretrees.oak_model={ moretrees.oak_model={
@ -41,6 +43,7 @@ moretrees.oak_model={
thin_branches=false, thin_branches=false,
fruit="moretrees:acorn", fruit="moretrees:acorn",
fruit_chance=3, fruit_chance=3,
enable_unique_ids = true,
} }
moretrees.sequoia_model={ moretrees.sequoia_model={
@ -55,7 +58,8 @@ moretrees.sequoia_model={
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="crossed", trunk_type="crossed",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.birch_model1={ moretrees.birch_model1={
@ -70,7 +74,8 @@ moretrees.birch_model1={
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="single", trunk_type="single",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.birch_model2={ moretrees.birch_model2={
@ -85,7 +90,8 @@ moretrees.birch_model2={
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="single", trunk_type="single",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.palm_model={ moretrees.palm_model={
@ -102,7 +108,8 @@ moretrees.palm_model={
trunk_type="single", trunk_type="single",
thin_branches=true, thin_branches=true,
fruit="moretrees:coconut", fruit="moretrees:coconut",
fruit_chance=0 fruit_chance=0,
enable_unique_ids = true,
} }
moretrees.spruce_model1={ moretrees.spruce_model1={
@ -119,7 +126,8 @@ moretrees.spruce_model1={
trunk_type="crossed", trunk_type="crossed",
thin_branches=true, thin_branches=true,
fruit="moretrees:spruce_cone", fruit="moretrees:spruce_cone",
fruit_chance=8 fruit_chance=8,
enable_unique_ids = true,
} }
moretrees.spruce_model2={ moretrees.spruce_model2={
@ -135,24 +143,26 @@ moretrees.spruce_model2={
trunk_type="crossed", trunk_type="crossed",
thin_branches=true, thin_branches=true,
fruit="moretrees:spruce_cone", fruit="moretrees:spruce_cone",
fruit_chance=8 fruit_chance=8,
enable_unique_ids = true,
} }
moretrees.cedar_model={ moretrees.pine_model={
axiom="FFFFFcccdddB///cFdFB////cFdFB///cFdFB///cFdFA///cFdFA///cFdFB[FF]f", axiom="FFFFFcccdddB///cFdFB////cFdFB///cFdFB///cFdFA///cFdFA///cFdFB[FF]f",
rules_a="[&&&TTTT[++^TFdd][--&TFd]//Tdd[+^Fd][--&Fdd]]", rules_a="[&&&TTTT[++^TFdd][--&TFd]//Tdd[+^Fd][--&Fdd]]",
rules_b="[&&&TTT[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]", rules_b="[&&&TTT[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
rules_c="/", rules_c="/",
rules_d="F", rules_d="F",
trunk="moretrees:cedar_trunk", trunk="moretrees:pine_trunk",
leaves="moretrees:cedar_leaves", leaves="moretrees:pine_leaves",
angle=30, angle=30,
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="single", trunk_type="single",
thin_branches=true, thin_branches=true,
fruit="moretrees:cedar_cone", fruit="moretrees:pine_cone",
fruit_chance=8 fruit_chance=8,
enable_unique_ids = true,
} }
moretrees.willow_model={ moretrees.willow_model={
@ -166,7 +176,8 @@ moretrees.willow_model={
iterations=2, iterations=2,
random_level=0, random_level=0,
trunk_type="crossed", trunk_type="crossed",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.acacia_model={ moretrees.acacia_model={
@ -191,13 +202,14 @@ moretrees.acacia_model={
.."GGfffff--G--" .."GGfffff--G--"
.."ffffGGG", .."ffffGGG",
rules_c = "/", rules_c = "/",
trunk="default:acacia_tree", trunk="moretrees:acacia_trunk",
leaves="default:acacia_leaves", leaves="moretrees:acacia_leaves",
angle=45, angle=45,
iterations=3, iterations=3,
random_level=0, random_level=0,
trunk_type="single", trunk_type="single",
thin_branches=true, thin_branches=true,
enable_unique_ids = true,
} }
moretrees.rubber_tree_model={ moretrees.rubber_tree_model={
@ -210,15 +222,16 @@ moretrees.rubber_tree_model={
iterations=3, iterations=3,
random_level=1, random_level=1,
trunk_type="double", trunk_type="double",
thin_branches=true thin_branches=true,
enable_unique_ids = true,
} }
moretrees.jungletree_model={ moretrees.jungletree_model={
axiom=nil, axiom=nil,
rules_a=nil, rules_a=nil,
rules_b=nil, rules_b=nil,
trunk="moretrees:jungletree_trunk", trunk="default:jungletree",
leaves="default:jungleleaves", leaves="moretrees:jungletree_leaves_green",
leaves2=nil, leaves2=nil,
leaves2_chance=nil, leaves2_chance=nil,
angle=45, angle=45,
@ -227,7 +240,8 @@ moretrees.jungletree_model={
trunk_type=nil, trunk_type=nil,
thin_branches=true, thin_branches=true,
fruit_chance=15, fruit_chance=15,
fruit="vines:vine" fruit="vines:vine",
enable_unique_ids = true,
} }
moretrees.fir_model={ moretrees.fir_model={
@ -242,5 +256,6 @@ moretrees.fir_model={
trunk_type="single", trunk_type="single",
thin_branches=true, thin_branches=true,
fruit="moretrees:fir_cone", fruit="moretrees:fir_cone",
fruit_chance=8 fruit_chance=8,
enable_unique_ids = true,
} }