aboutsummaryrefslogtreecommitdiff
path: root/src/treegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/treegen.cpp')
-rw-r--r--src/treegen.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/treegen.cpp b/src/treegen.cpp
index 5ddf1132d..9df528a21 100644
--- a/src/treegen.cpp
+++ b/src/treegen.cpp
@@ -510,8 +510,15 @@ v3f transposeMatrix(irr::core::matrix4 M, v3f v)
void make_jungletree(VoxelManipulator &vmanip, v3s16 p0,
INodeDefManager *ndef, int seed)
{
- MapNode treenode(ndef->getId("mapgen_jungletree"));
- MapNode leavesnode(ndef->getId("mapgen_leaves"));
+ content_t c_tree = ndef->getId("mapgen_jungletree");
+ content_t c_leaves = ndef->getId("mapgen_jungleleaves");
+ if (c_tree == CONTENT_IGNORE)
+ c_tree = ndef->getId("mapgen_tree");
+ if (c_leaves == CONTENT_IGNORE)
+ c_leaves = ndef->getId("mapgen_leaves");
+
+ MapNode treenode(c_tree);
+ MapNode leavesnode(c_leaves);
PseudoRandom pr(seed);
for(s16 x=-1; x<=1; x++)