1
0

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
This commit is contained in:
madmaxoft@gmail.com
2013-06-22 18:41:08 +00:00
parent c8fc397b43
commit 9dd0486faf
11 changed files with 445 additions and 24 deletions

View File

@@ -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));
}