summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-14 14:38:35 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-14 14:40:45 -0400
commit6694b8da616241ec59072950f60e686464526178 (patch)
tree4dd93899b2aee40f1e23f2bf005082b38c1faefa
parent2ae8a32aa368b0962d90ec3a509c5d80df7e6f39 (diff)
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
-rw-r--r--biome_defs.lua29
-rw-r--r--init.lua21
-rw-r--r--node_defs.lua7
-rw-r--r--tree_models.lua2
4 files changed, 34 insertions, 25 deletions
diff --git a/biome_defs.lua b/biome_defs.lua
index 6f3bf0d..34d8e4e 100644
--- a/biome_defs.lua
+++ b/biome_defs.lua
@@ -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 = {
@@ -180,4 +186,3 @@ moretrees.fir_biome_snow = {
delete_above = true,
spawn_replace_node = true
}
-
diff --git a/init.lua b/init.lua
index 0fe676f..8bf900e 100644
--- a/init.lua
+++ b/init.lua
@@ -118,14 +118,13 @@ else
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
biome_lib:register_generate_plant(moretrees.beech_biome, moretrees.spawn_beech_object)
end
@@ -183,7 +182,7 @@ 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)
@@ -194,7 +193,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)
@@ -219,7 +218,7 @@ 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
@@ -259,7 +258,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
@@ -286,7 +285,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
diff --git a/node_defs.lua b/node_defs.lua
index 35fb1d4..3753be0 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -383,6 +383,12 @@ minetest.register_abm({
end,
})
+-- 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.
+
+local jungle_tree = moretrees.clone_node("default:jungletree")
+minetest.register_node("moretrees:jungletree_trunk", jungle_tree)
+
-- For compatibility with old nodes, recently-changed nodes, and default nodes
minetest.register_alias("technic:rubber_tree_full", "moretrees:rubber_tree_trunk")
@@ -411,7 +417,6 @@ 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_trunk", "default:jungletree")
minetest.register_alias("moretrees:jungletree_planks", "default:junglewood")
minetest.register_alias("moretrees:jungletree_leaves_green", "default:jungletree_leaves")
diff --git a/tree_models.lua b/tree_models.lua
index f29594a..3443057 100644
--- a/tree_models.lua
+++ b/tree_models.lua
@@ -217,7 +217,7 @@ moretrees.jungletree_model={
axiom=nil,
rules_a=nil,
rules_b=nil,
- trunk="default:jungletree",
+ trunk="moretrees:jungletree_trunk",
leaves="default:jungleleaves",
leaves2=nil,
leaves2_chance=nil,