From 9dd0486faf6f52eb40e47f003d4c02eefc28c8f9 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 22 Jun 2013 18:41:08 +0000 Subject: Added the End height and composition generators. Also made the dimension in world.ini specifiable by a string. Exported StringToDimension() and StringToBiome() to Lua API. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1621 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/ComposableGenerator.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/Generating/ComposableGenerator.cpp') diff --git a/source/Generating/ComposableGenerator.cpp b/source/Generating/ComposableGenerator.cpp index 7cf099c1f..c038712aa 100644 --- a/source/Generating/ComposableGenerator.cpp +++ b/source/Generating/ComposableGenerator.cpp @@ -19,6 +19,7 @@ #include "Caves.h" #include "DistortedHeightmap.h" +#include "EndGen.h" #include "MineShafts.h" #include "Noise3DGenerator.h" #include "Ravines.h" @@ -250,6 +251,11 @@ void cComposableGenerator::InitHeightGen(cIniFile & a_IniFile) m_HeightGen = new cDistortedHeightmap(Seed, *m_BiomeGen); ((cDistortedHeightmap *)m_HeightGen)->Initialize(a_IniFile); } + else if (NoCaseCompare(HeightGenName, "End") == 0) + { + m_HeightGen = new cEndGen(Seed); + ((cEndGen *)m_HeightGen)->Initialize(a_IniFile); + } else if (NoCaseCompare(HeightGenName, "Noise3D") == 0) { m_HeightGen = new cNoise3DComposable(Seed); @@ -337,6 +343,11 @@ void cComposableGenerator::InitCompositionGen(cIniFile & a_IniFile) m_CompositionGen = new cDistortedHeightmap(m_ChunkGenerator.GetSeed(), *m_BiomeGen); ((cDistortedHeightmap *)m_CompositionGen)->Initialize(a_IniFile); } + else if (NoCaseCompare(CompoGenName, "end") == 0) + { + m_CompositionGen = new cEndGen(m_ChunkGenerator.GetSeed()); + ((cEndGen *)m_CompositionGen)->Initialize(a_IniFile); + } else if (NoCaseCompare(CompoGenName, "nether") == 0) { m_CompositionGen = new cCompoGenNether(m_ChunkGenerator.GetSeed()); @@ -469,7 +480,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) // Finishers, alpha-sorted: if (NoCaseCompare(*itr, "BottomLava") == 0) { - int DefaultBottomLavaLevel = (m_World->GetDimension() == cWorld::dimNether) ? 30 : 10; + int DefaultBottomLavaLevel = (m_World->GetDimension() == dimNether) ? 30 : 10; int BottomLavaLevel = a_IniFile.GetValueSetI("Generator", "BottomLavaLevel", DefaultBottomLavaLevel); m_FinishGens.push_back(new cFinishGenBottomLava(BottomLavaLevel)); } -- cgit v1.2.3