1
0
mirror of https://github.com/mt-mods/moretrees.git synced 2025-06-29 22:51:02 +02:00

23 Commits

Author SHA1 Message Date
817b410cc4 Version MFF. 2018-09-08 13:18:30 +02:00
75e8027bf7 Make cocos palm regrow coconuts.
This feature is optional, and can be turned off.

Existing cocos trees are converted.
2016-06-27 23:23:54 +02:00
c87a169fdd Add recipes with dates (and nuts, and coconut)
Using a combination of dates, nuts and coconut, an extremely high
energy date-nut cake can be baked (32 units of food). It's main purpose
is to be a very concentrated transport mechanism of food, but it can be
used for instant replenishment of a starving soul. In practise, it will
be used to craft date-nut energy bars, which merely have a good
nutritional value (4 units).

Because of its exceptional nature, the cake requires special ingredients
(all three types of nuts, as well as coconuts), and given the ingredients,
3 steps are needed (including one cooking step) to bake it. All of the
ingredients themselves, except dates, are not found in nature, but must
also be prepared.
2016-06-27 23:23:54 +02:00
afab0692df Add date palm
Spawns in hot and dry desert, but requires water. This makes it a bit harder to
find, but where found, it can be more abundant.
If found in the middle of a desert, its presence indicates a water source below
the surface.

As an additional optional feature, dates (slowly) grow back after harvesting.
2016-06-27 23:23:54 +02:00
9ced339ce5 Add dependency on vessels mod
Acorn coconut milk and muffin batter recipes use a drinking glass.
2016-06-27 23:23:54 +02:00
47980f5c86 Merge pull request #23 from Rogier-5/cedar
Restore previous pine as cedar
2016-05-18 13:06:00 -04:00
cd9926f9e5 Restore previous pine as cedar
Commit ad0cbbc0f disabled the previous moretrees pine, and aliased it to the
default minetest pine.  The default pine is a completely different tree though,
with different apppearance and different textures.

This commit restores the previous pine tree, renaming it to cedar to avoid a tree
name clash with the default game. Any existing moretrees pine trees will be
converted to cedar, so that their appearance does not change. Moretrees pine
trees that have already been converted to the default pine tree are not converted
back.
2016-05-18 16:54:45 +02:00
ee5bc1dfb3 Add screenshot.png 2016-03-27 22:32:39 -07:00
62eb522948 Adding standard mod files 2016-03-27 21:16:35 -07:00
8e0eeb5747 fix sapling growth
(biome_lib requires "foo.bar" when using "quoted string" function calls)
2015-08-21 15:31:05 -04:00
fa3c3c6004 fix alias 2015-08-21 09:07:31 -04:00
0c596f332e fix copy&paste error in green -> default jungle leaves alias 2015-08-17 18:20:19 -04:00
1cd2216731 don't copy default settings to user's world folder. 2015-08-15 17:15:08 -04:00
2aad14a883 fix bad texture refs on saplings 2015-08-15 17:13:18 -04:00
f59fd56257 use default leaf decay code for everything. 2015-08-15 16:58:17 -04:00
6694b8da61 made birch, spruce, fir, and jungle trees spawn again
turned out to be I was using foo:bar for their function calls, which
biome_lib filters out (only group defs can use that format).  Changed
them to quoted-string "foo.bar" format.  Also, jungle trees need a
moretrees-specific copy of the default jungle trunk node so that there's
something unique to match against for the density limit.

also, made jungle trees use the same biome settings as giant tree ferns
2015-08-14 14:40:45 -04:00
2ae8a32aa3 Use default nodes wherever possible
for pines, jungle trees/leaves, acacias
2015-08-14 13:16:51 -04:00
7a105a0841 don't run the decay code on ANY of the default trees
this also disables decaying default trees and default jungletrees with
the regular default single color leaves
2015-08-14 11:45:13 -04:00
10ce68961f update to match the renaming of plants_lib --> biome_lib 2015-08-09 10:34:53 -04:00
ba170ee66e use clone-node method to redefine apple
(only way to add a new group item, for compat with rubenwardy's food mod)
2015-07-30 09:42:47 -04:00
8276d82bac Add default:dirt_with_dry_grass to acacia_biome. 2015-07-19 16:44:22 -04:00
ad0cbbc0fa don't define acacia and pine nodes - alias them to the default ones instead 2015-07-19 16:41:55 -04:00
adecd4b1ea add support for the default stairs mod
renamed the relevant enable setting
2015-07-19 16:00:30 -04:00
95 changed files with 314 additions and 450 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

2
README.md Normal file → Executable 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
Ezekowitz.
Dependencies: <a href="https://github.com/VanessaE/plantlife">plants_lib</a> and default
Dependencies: <a href="https://forum.minetest.net/viewtopic.php?f=11&t=12999">biome_lib</a> and default

33
biome_defs.lua Normal file → Executable file
View File

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

43
crafts.lua Normal file → Executable file
View File

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

47
default_settings.txt Normal file → Executable file
View File

@ -6,7 +6,7 @@ moretrees.enable_apple_tree = true
moretrees.enable_oak = true
moretrees.enable_sequoia = true
moretrees.enable_palm = true
moretrees.enable_pine = true
moretrees.enable_cedar = true
moretrees.enable_rubber_tree = true
moretrees.enable_willow = true
moretrees.enable_acacia = true
@ -17,14 +17,16 @@ moretrees.enable_fir = true
moretrees.enable_beech = false
-- set this to true to make moretrees spawn saplings at mapgen time instead
-- of fully-grown trees, which will grow into full trees very quickly. With
-- older versions of plants_lib, doing this will reduce mapgen lag.
-- of fully-grown trees, which will grow into full trees after a very short
-- delay. This reduces mapgen lag in some situations.
moretrees.spawn_saplings = false
-- Set this to true to allow usage of the stairsplus mod in moreblocks
-- Set this to true to allow defining stairs/slabs/etc. If Moreblocks is
-- 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_stairsplus = true
moretrees.enable_stairs = true
-- Set this to true if you want the plantlike drawtype for leaves, which
-- improves some peoples' framerates without resorting to making leaf nodes opaque.
@ -32,42 +34,21 @@ moretrees.enable_stairsplus = true
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
-- fall when leaves decay/are dug.
moretrees.enable_redefine_apple = true
-- various settings to configure default and default-jungle leaf decay.
-- Set this to true to enable leaf decay of all trees except the default ones.
moretrees.enable_leafdecay = true
-- various related settings to configure leaf decay.
moretrees.leafdecay_delay = 2
moretrees.leafdecay_chance = 100
moretrees.leafdecay_chance = 5
moretrees.leafdecay_radius = 5
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
moretrees.palm_leafdecay_radius = 10
-- Change these settings if you want default trees to be gradually cut down
-- above the elevation where firs normally generate.

3
depends.txt Normal file → Executable file
View File

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

1
description.txt Normal file
View File

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

110
init.lua Normal file → Executable file
View File

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

View File

@ -1,117 +0,0 @@
-- 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 Normal file → Executable file
View File

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

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

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

1
mod.conf Normal file
View File

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

305
node_defs.lua Normal file → Executable file
View File

@ -1,21 +1,22 @@
local S = moretrees.intllib
moretrees.avoidnodes = {}
moretrees.treelist = {
{"beech", "Beech 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"},
{"birch", "Birch Tree"},
{"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 },
{"pine", "Pine Tree", "pine_cone", "Pine Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"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 },
{"cedar", "Cedar Tree", "cedar_cone", "Cedar Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"willow", "Willow Tree"},
{"acacia", "Acacia Tree"},
{"rubber_tree", "Rubber Tree"},
{"jungletree", "Jungle Tree"},
{"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"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 }
@ -25,18 +26,13 @@ local dirs3 = { 14, 11, 16, 5, 14 }
local moretrees_new_leaves_drawtype = "allfaces_optional"
local moretrees_plantlike_leaves_visual_scale = 1
if moretrees.plantlike_leaves then
if moretrees.plantlike_leaves then
moretrees_new_leaves_drawtype = "plantlike"
moretrees_plantlike_leaves_visual_scale = 1.189
end
-- 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
minetest.override_item("default:leaves", {
inventory_image = minetest.inventorycube("default_leaves.png"),
@ -51,11 +47,6 @@ end
-- 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
minetest.override_item("default:jungleleaves", {
inventory_image = minetest.inventorycube("default_jungleleaves.png"),
@ -76,7 +67,13 @@ for i in ipairs(moretrees.treelist) do
local selbox = moretrees.treelist[i][5]
local vscale = moretrees.treelist[i][6]
if treename ~= "jungletree" then -- the default game provides jungle tree trunk/planks nodes.
local saptex = moretrees.treelist[i][7]
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", {
description = S(treedesc.." Trunk"),
@ -103,9 +100,10 @@ for i in ipairs(moretrees.treelist) do
minetest.register_node("moretrees:"..treename.."_sapling", {
description = S(treedesc.." Sapling"),
drawtype = "plantlike",
tiles = {"moretrees_"..treename.."_sapling.png"},
inventory_image = "moretrees_"..treename.."_sapling.png",
tiles = {saptex},
inventory_image = saptex,
paramtype = "light",
paramtype2 = "waving",
walkable = false,
selection_box = {
type = "fixed",
@ -114,32 +112,17 @@ for i in ipairs(moretrees.treelist) do
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
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 leaves only if he/she gets no saplings,
-- this is because max_items is 1
local droprarity = 100
local decay = moretrees.leafdecay_radius
if treename == "palm" then
droprarity = 20
decay = moretrees.palm_leafdecay_radius
end
local moretrees_leaves_inventory_image = nil
@ -159,7 +142,7 @@ for i in ipairs(moretrees.treelist) do
tiles = { "moretrees_"..treename.."_leaves.png" },
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = decay},
sounds = default.node_sound_leaves_defaults(),
drop = {
@ -171,40 +154,83 @@ for i in ipairs(moretrees.treelist) do
},
})
if minetest.get_modpath("moreblocks") and moretrees.enable_stairsplus then
if moretrees.enable_stairs then
if minetest.get_modpath("moreblocks") then
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
stairsplus:register_all(
"moretrees",
treename.."_trunk",
"moretrees:"..treename.."_trunk",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = {
"moretrees_"..treename.."_trunk_top.png",
stairsplus:register_all(
"moretrees",
treename.."_trunk",
"moretrees:"..treename.."_trunk",
{
groups = { snappy=1, choppy=2, oddly_breakable_by_hand=1, flammable=2, not_in_creative_inventory=1 },
tiles = {
"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.png"
},
description = S(treedesc.." Trunk"),
drop = treename.."_trunk",
}
)
S(treedesc.." Trunk Stair"),
S(treedesc.." Trunk Slab"),
default.node_sound_wood_defaults()
)
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",
}
)
stairs.register_stair_and_slab(
"moretrees_"..treename.."_planks",
"moretrees:"..treename.."_planks",
{ snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3 },
{ "moretrees_"..treename.."_wood.png" },
S(treedesc.." Planks Stair"),
S(treedesc.." Planks Slab"),
default.node_sound_wood_defaults()
)
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
minetest.register_node("moretrees:"..fruit, {
description = S(fruitdesc),
@ -213,8 +239,9 @@ for i in ipairs(moretrees.treelist) do
inventory_image = "moretrees_"..fruit..".png^[transformR180",
wield_image = "moretrees_"..fruit..".png^[transformR180",
visual_scale = vscale,
walkable = false,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = selbox
@ -230,7 +257,7 @@ for i in ipairs(moretrees.treelist) do
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
nfdir = dirs2[fdir+1]
local nfdir = dirs2[fdir+1]
minetest.add_node(pos, {name = "moretrees:"..treename.."_trunk", param2 = nfdir})
end,
})
@ -238,51 +265,16 @@ for i in ipairs(moretrees.treelist) do
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_trunk")
if moretrees.spawn_saplings then
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling")
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen")
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling")
table.insert(moretrees.avoidnodes, "moretrees:"..treename.."_sapling_ongen")
end
end
-- Extra nodes for jungle trees:
minetest.register_node("moretrees:jungletree_sapling", {
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,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 jungleleaves = {"yellow","red"}
local jungleleavesnames = {"Yellow", "Red"}
for color = 1, #jungleleaves do
local leave_name = "moretrees:jungletree_leaves_"..jungleleaves[color]
local moretrees_leaves_inventory_image = nil
@ -301,11 +293,11 @@ for color = 1, 3 do
tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..".png"},
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1},
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
drop = {
max_items = 1,
items = {
{items = {'moretrees:jungletree_sapling'}, rarity = 100 },
{items = {"default:junglesapling"}, rarity = 100 },
{items = {"moretrees:jungletree_leaves_"..jungleleaves[color]} }
}
},
@ -329,7 +321,7 @@ minetest.register_node("moretrees:fir_leaves_bright", {
tiles = { "moretrees_fir_leaves_bright.png" },
inventory_image = moretrees_leaves_inventory_image,
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 },
groups = {snappy = 3, flammable = 2, leaves = 1, moretrees_leaves = 1, leafdecay = moretrees.leafdecay_radius },
drop = {
max_items = 1,
items = {
@ -341,21 +333,22 @@ minetest.register_node("moretrees:fir_leaves_bright", {
})
if moretrees.enable_redefine_apple then
minetest.override_item("default:apple",
{groups = { fleshy=3, dig_immediate=3, flammable=2, leafdecay=3, leafdecay_drop=1, attached_node = 1}
})
local appledef = moretrees.clone_node("default:apple")
appledef.groups.attached_node = 1
minetest.register_node(":default:apple", appledef)
end
table.insert(moretrees.avoidnodes, "default:jungletree")
table.insert(moretrees.avoidnodes, "moretrees:jungletree_trunk")
table.insert(moretrees.avoidnodes, "default:pine_tree")
table.insert(moretrees.avoidnodes, "default:acacia_tree")
table.insert(moretrees.avoidnodes, "moretrees:fir_trunk")
table.insert(moretrees.avoidnodes, "default:tree")
if moretrees.spawn_saplings then
table.insert(moretrees.avoidnodes, "snow:sapling_pine")
table.insert(moretrees.avoidnodes, "default:junglesapling")
table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling")
table.insert(moretrees.avoidnodes, "moretrees:jungle_tree_sapling_ongen")
table.insert(moretrees.avoidnodes, "snow:sapling_pine")
table.insert(moretrees.avoidnodes, "default:junglesapling")
table.insert(moretrees.avoidnodes, "default:pine_sapling")
table.insert(moretrees.avoidnodes, "default:acacia_sapling")
end
-- "empty" (tapped) rubber tree nodes
@ -385,38 +378,60 @@ minetest.register_abm({
end,
})
-- For compatibility with old nodes and recently-changed nodes.
-- To get Moretrees to generate its own jungle trees among the default mapgen
-- we need our own copy of that node, which moretrees will match against.
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_alias("farming_plus:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_alias("farming:rubber_tree_full", "moretrees:rubber_tree_trunk")
local jungle_tree = moretrees.clone_node("default:jungletree")
jungle_tree.drop = jungle_tree.drop or { items = {} }
table.insert(jungle_tree.drop.items, { items = {"default:jungletree"}})
minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
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")
-- For compatibility with old nodes, recently-changed nodes, and default nodes
minetest.register_alias("technic:rubber_tree_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming_plus:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_alias("farming_plus:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_alias("farming:rubber_tree_full", "moretrees:rubber_tree_trunk")
minetest.register_alias("default:junglesapling","moretrees:jungletree_sapling")
minetest.register_alias("moretrees:jungletree_trunk_sideways", "moreblocks:horizontal_jungle_tree")
minetest.register_alias("moretrees:jungletree_trunk", "default:jungletree")
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
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("jungletree:leaves_green", "moretrees:jungletree_leaves_green")
minetest.register_alias("jungletree:leaves_red", "moretrees:jungletree_leaves_red")
minetest.register_alias("jungletree:leaves_yellow", "moretrees:jungletree_leaves_yellow")
minetest.register_alias("technic:rubber_tree_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming_plus:rubber_sapling", "moretrees:rubber_tree_sapling")
minetest.register_alias("farming:rubber_sapling", "moretrees:rubber_tree_sapling")
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_leaves", "moretrees:fir_leaves")
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_trunk", "moretrees:fir_trunk")
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_bright", "moretrees:fir_leaves_bright")
minetest.register_alias("moretrees:conifer_sapling", "moretrees:fir_sapling")
minetest.register_alias("conifers:trunk", "moretrees:fir_trunk")
minetest.register_alias("conifers:trunk_reversed", "moretrees:fir_trunk_sideways")
minetest.register_alias("conifers:leaves", "moretrees:fir_leaves")
minetest.register_alias("conifers:leaves_special", "moretrees:fir_leaves_bright")
minetest.register_alias("conifers:sapling", "moretrees:fir_sapling")
minetest.register_alias("conifers:trunk", "moretrees:fir_trunk")
minetest.register_alias("conifers:trunk_reversed", "moretrees:fir_trunk_sideways")
minetest.register_alias("conifers:leaves", "moretrees:fir_leaves")
minetest.register_alias("conifers:leaves_special", "moretrees:fir_leaves_bright")
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 Normal file → Executable 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
plantslib:dbg(dump(moretrees[tree_biome].surface))
plantslib:grow_plants({
biome_lib:dbg(dump(moretrees[tree_biome].surface))
biome_lib:grow_plants({
grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:"..treename.."_sapling",
@ -16,7 +16,7 @@ for i in ipairs(moretrees.treelist) do
grow_function = moretrees[tree_model],
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = 2,
grow_chance = 30,
grow_plant = "moretrees:"..treename.."_sapling_ongen",
@ -27,67 +27,67 @@ for i in ipairs(moretrees.treelist) do
end
end
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:birch_sapling",
grow_nodes = moretrees.birch_biome.surface,
grow_function = "moretrees:grow_birch"
grow_function = "moretrees.grow_birch"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = 2,
grow_chance = 30,
grow_plant = "moretrees:birch_sapling_ongen",
grow_nodes = moretrees.birch_biome.surface,
grow_function = "moretrees:grow_birch"
grow_function = "moretrees.grow_birch"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:spruce_sapling",
grow_nodes = moretrees.spruce_biome.surface,
grow_function = "moretrees:grow_spruce"
grow_function = "moretrees.grow_spruce"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = 2,
grow_chance = 30,
grow_plant = "moretrees:spruce_sapling_ongen",
grow_nodes = moretrees.spruce_biome.surface,
grow_function = "moretrees:grow_spruce"
grow_function = "moretrees.grow_spruce"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:fir_sapling",
grow_nodes = moretrees.fir_biome.surface,
grow_function = "moretrees:grow_fir"
grow_function = "moretrees.grow_fir"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = 2,
grow_chance = 30,
grow_plant = "moretrees:fir_sapling_ongen",
grow_nodes = moretrees.fir_biome.surface,
grow_function = "moretrees:grow_fir"
grow_function = "moretrees.grow_fir"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = moretrees.sapling_interval,
grow_chance = moretrees.sapling_chance,
grow_plant = "moretrees:jungletree_sapling",
grow_plant = "default:junglesapling",
grow_nodes = moretrees.jungletree_biome.surface,
grow_function = "moretrees:grow_jungletree"
grow_function = "moretrees.grow_jungletree"
})
plantslib:grow_plants({
biome_lib:grow_plants({
grow_delay = 2,
grow_chance = 30,
grow_plant = "moretrees:jungletree_sapling_ongen",
grow_nodes = moretrees.jungletree_biome.surface,
grow_function = "moretrees:grow_jungletree"
grow_function = "moretrees.grow_jungletree"
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

BIN
textures/moretrees_acorn.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 398 B

BIN
textures/moretrees_acorn_muffin.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 765 B

BIN
textures/moretrees_acorn_muffin_batter.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 602 B

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

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

BIN
textures/moretrees_apple_tree_sapling.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 178 B

0
textures/moretrees_apple_tree_trunk.png Normal file → Executable 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 Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

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

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

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

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

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

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

BIN
textures/moretrees_beech_trunk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 B

After

Width:  |  Height:  |  Size: 964 B

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

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

BIN
textures/moretrees_beech_wood.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 170 B

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

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 459 B

BIN
textures/moretrees_birch_sapling.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 204 B

BIN
textures/moretrees_birch_trunk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 B

After

Width:  |  Height:  |  Size: 959 B

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

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 811 B

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

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

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_coconut.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 963 B

After

Width:  |  Height:  |  Size: 963 B

BIN
textures/moretrees_coconut_milk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 211 B

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

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

BIN
textures/moretrees_fir_cone.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 227 B

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

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

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

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

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

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

BIN
textures/moretrees_fir_sapling.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 161 B

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

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

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

Before

Width:  |  Height:  |  Size: 924 B

After

Width:  |  Height:  |  Size: 924 B

BIN
textures/moretrees_fir_wood.png Normal file → Executable 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 Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

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

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

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

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

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

Before

Width:  |  Height:  |  Size: 730 B

After

Width:  |  Height:  |  Size: 730 B

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

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 172 B

BIN
textures/moretrees_oak_trunk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

After

Width:  |  Height:  |  Size: 982 B

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

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

BIN
textures/moretrees_oak_wood.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 599 B

BIN
textures/moretrees_palm_leaves.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

After

Width:  |  Height:  |  Size: 902 B

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

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

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

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

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

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 400 B

BIN
textures/moretrees_palm_wood.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 580 B

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

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 466 B

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

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

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

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

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

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 693 B

BIN
textures/moretrees_rubber_tree_trunk_empty.png Normal file → Executable 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 Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 534 B

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

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

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

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

BIN
textures/moretrees_sequoia_sapling.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 199 B

BIN
textures/moretrees_sequoia_trunk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

After

Width:  |  Height:  |  Size: 620 B

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

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 594 B

BIN
textures/moretrees_sequoia_wood.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1021 B

BIN
textures/moretrees_spruce_cone.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 478 B

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

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

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

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

BIN
textures/moretrees_spruce_sapling.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 151 B

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

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

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

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

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

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 536 B

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

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 409 B

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

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

BIN
textures/moretrees_willow_trunk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 620 B

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

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 513 B

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

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 565 B

5
tree_biomes.txt Normal file → Executable 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
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
pine n/a n/a water, 15 5 dirt_with grass 336 10
cedar 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
acacia n/a n/a n/a n/a dirt_with_grass,
desert_sand n/a 15
@ -32,3 +32,6 @@ 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,
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 Normal file → Executable file
View File

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