diff options
author | 12xx12 <44411062+12xx12@users.noreply.github.com> | 2021-04-08 12:18:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 12:18:18 +0200 |
commit | d78bcac15035ddd096df6187a36e630071cba5c4 (patch) | |
tree | e7100a5f13c94b36cccdcaeb149e72ca8c6f41b9 /src/Generating/ComposableGenerator.cpp | |
parent | Teleport off of mount when throwing enderpearl (#5179) (diff) | |
download | cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar.gz cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar.bz2 cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar.lz cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar.xz cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.tar.zst cuberite-d78bcac15035ddd096df6187a36e630071cba5c4.zip |
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r-- | src/Generating/ComposableGenerator.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index d5c64e4c4..9b170ecc8 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -23,6 +23,7 @@ #include "DistortedHeightmap.h" #include "DungeonRoomsFinisher.h" #include "EndGen.h" +#include "EnderDragonFightStructuresGen.h" #include "MineShafts.h" #include "Noise3DGenerator.h" #include "Ravines.h" @@ -262,7 +263,7 @@ void cComposableGenerator::InitializeGeneratorDefaults(cIniFile & a_IniFile, eDi a_IniFile.GetValueSet("Generator", "ConstantBiome", "End"); a_IniFile.GetValueSet("Generator", "ShapeGen", "End"); a_IniFile.GetValueSet("Generator", "CompositionGen", "End"); - a_IniFile.GetValueSet("Generator", "Finishers", ""); + a_IniFile.GetValueSet("Generator", "Finishers", "EnderDragonFightStructures"); break; } // dimEnd @@ -450,6 +451,19 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) AString HeightDistrib = a_IniFile.GetValueSet ("Generator", "DungeonRoomsHeightDistrib", "0, 0; 10, 10; 11, 500; 40, 500; 60, 40; 90, 1"); m_FinishGens.push_back(std::make_unique<cDungeonRoomsFinisher>(*m_ShapeGen, m_Seed, GridSize, MaxSize, MinSize, HeightDistrib)); } + else if (NoCaseCompare(finisher, "EnderDragonFightStructures") == 0) + { + AString Pillars = a_IniFile.GetValueSet("Generator", "ObsidianPillars", + "76|3|false; 79|3|true; 82|3|true; " + "85|4|false; 88|4|false; 91|4|false; " + "94|5|false; 97|5|false; 100|5|false; " + "103|6|false"); + int Radius = a_IniFile.GetValueSetI("Generator", "ObsidianPillarsRadius", 43); + // The init method is called manually because the linker can't access the cChunkDef::Width in the constructor + auto Gen = new cEnderDragonFightStructuresGen(m_Seed); + Gen->Init(Pillars, Radius); + m_FinishGens.push_back(cFinishGenPtr(Gen)); + } else if (NoCaseCompare(finisher, "GlowStone") == 0) { m_FinishGens.push_back(std::make_unique<cFinishGenGlowStone>(m_Seed)); |