summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-09-18 00:20:50 +0200
committerGitHub <noreply@github.com>2020-09-18 00:20:50 +0200
commitc18fe8aa45fa731a134c454dd16e1111742ca936 (patch)
treea567e935465ac63f480260b76206b260f16de708 /src/Generating/ComposableGenerator.cpp
parentAdded recipe for the observer. (#4880) (diff)
downloadcuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar.gz
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar.bz2
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar.lz
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar.xz
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.tar.zst
cuberite-c18fe8aa45fa731a134c454dd16e1111742ca936.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/ComposableGenerator.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index 5dd54a497..7c891f5fa 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -27,6 +27,7 @@
#include "Noise3DGenerator.h"
#include "Ravines.h"
#include "RoughRavines.h"
+#include "SinglePieceStructuresGen.h"
#include "VillageGen.h"
#include "PieceStructuresGen.h"
@@ -217,6 +218,7 @@ void cComposableGenerator::InitializeGeneratorDefaults(cIniFile & a_IniFile, eDi
"Mineshafts, "
"Trees, "
"Villages, "
+ "SinglePieceStructures: JungleTemple|WitchHut|DesertPyramid|DesertWell, "
"TallGrass, "
"SprinkleFoliage, "
"Ice, "
@@ -606,6 +608,20 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
GridSize, MaxOffset
)));
}
+ else if (NoCaseCompare(finisher, "SinglePieceStructures") == 0)
+ {
+ if (split.size() < 2)
+ {
+ LOGWARNING("The SinglePieceStructures generator needs the structures to use. Example: \"SinglePieceStructures: DesertPyramid\".");
+ continue;
+ }
+
+ auto Gen = std::make_shared<cSinglePieceStructuresGen>(m_Seed);
+ if (Gen->Initialize(split[1], seaLevel, m_BiomeGen, m_CompositedHeightCache))
+ {
+ m_FinishGens.push_back(Gen);
+ }
+ }
else if (NoCaseCompare(finisher, "SoulsandRims") == 0)
{
m_FinishGens.push_back(cFinishGenPtr(new cFinishGenSoulsandRims(m_Seed)));