summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-25 16:52:32 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-25 16:52:32 +0100
commitd6ad5245b3590cc71686a763d71db82542b2f279 (patch)
treee03a27694e4b589f5bf04d2a595393661fa36654 /src/Generating/ComposableGenerator.cpp
parentMerge pull request #2687 from Gargaj/signfix (diff)
parentOrePockets finisher is now configurable. (diff)
downloadcuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar.gz
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar.bz2
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar.lz
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar.xz
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.tar.zst
cuberite-d6ad5245b3590cc71686a763d71db82542b2f279.zip
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r--src/Generating/ComposableGenerator.cpp128
1 files changed, 19 insertions, 109 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index eb1d0e1ee..fa8db8f93 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -330,6 +330,14 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
{
m_FinishGens.push_back(cFinishGenPtr(new cStructGenDirectOverhangs(Seed)));
}
+ else if (NoCaseCompare(*itr, "DirtPockets") == 0)
+ {
+ auto gen = std::make_shared<cFinishGenOrePockets>(Seed + 1, cFinishGenOrePockets::DefaultNaturalPatches());
+ if (gen->Initialize(a_IniFile, "DirtPockets"))
+ {
+ m_FinishGens.push_back(gen);
+ }
+ }
else if (NoCaseCompare(*itr, "DistortedMembraneOverhangs") == 0)
{
m_FinishGens.push_back(cFinishGenPtr(new cStructGenDistortedMembraneOverhangs(Seed)));
@@ -397,52 +405,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "NaturalPatches") == 0)
{
- cStructGenOreNests::OreList Ores;
-
- // Dirt vein
- cStructGenOreNests::OreInfo DirtVein;
- DirtVein.BlockType = E_BLOCK_DIRT;
- DirtVein.MaxHeight = 127;
- DirtVein.NumNests = 20;
- DirtVein.NestSize = 32;
- Ores.push_back(DirtVein);
-
- // Gravel vein
- cStructGenOreNests::OreInfo GravelVein;
- GravelVein.BlockType = E_BLOCK_GRAVEL;
- GravelVein.MaxHeight = 127;
- GravelVein.NumNests = 20;
- GravelVein.NestSize = 32;
- Ores.push_back(GravelVein);
-
- // Granite vein
- cStructGenOreNests::OreInfo GraniteVein;
- GraniteVein.BlockType = E_BLOCK_STONE;
- GraniteVein.BlockMeta = 1;
- GraniteVein.MaxHeight = 127;
- GraniteVein.NumNests = 20;
- GraniteVein.NestSize = 32;
- Ores.push_back(GraniteVein);
-
- // Diorite vein
- cStructGenOreNests::OreInfo DioriteVein;
- DioriteVein.BlockType = E_BLOCK_STONE;
- DioriteVein.BlockMeta = 3;
- DioriteVein.MaxHeight = 127;
- DioriteVein.NumNests = 20;
- DioriteVein.NestSize = 32;
- Ores.push_back(DioriteVein);
-
- // Andesite vein
- cStructGenOreNests::OreInfo AndesiteVein;
- AndesiteVein.BlockType = E_BLOCK_STONE;
- AndesiteVein.BlockMeta = 5;
- AndesiteVein.MaxHeight = 127;
- AndesiteVein.NumNests = 20;
- AndesiteVein.NestSize = 32;
- Ores.push_back(AndesiteVein);
-
- m_FinishGens.push_back(cFinishGenPtr(new cStructGenOreNests(Seed, Ores, E_BLOCK_STONE)));
+ m_FinishGens.push_back(std::make_shared<cFinishGenOreNests>(Seed + 1, cFinishGenOreNests::DefaultNaturalPatches()));
}
else if (NoCaseCompare(*itr, "NetherClumpFoliage") == 0)
{
@@ -457,72 +420,19 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "NetherOreNests") == 0)
{
- cStructGenOreNests::OreList Ores;
-
- // Quartz vein
- cStructGenOreNests::OreInfo QuartzVein;
- QuartzVein.BlockType = E_BLOCK_NETHER_QUARTZ_ORE;
- QuartzVein.MaxHeight = 255;
- QuartzVein.NumNests = 80;
- QuartzVein.NestSize = 8;
- Ores.push_back(QuartzVein);
-
- m_FinishGens.push_back(cFinishGenPtr(new cStructGenOreNests(Seed, Ores, E_BLOCK_NETHERRACK)));
-
+ m_FinishGens.push_back(std::make_shared<cFinishGenOreNests>(Seed + 2, cFinishGenOreNests::DefaultNetherOres()));
}
else if (NoCaseCompare(*itr, "OreNests") == 0)
{
- cStructGenOreNests::OreList Ores;
-
- // Coal vein
- cStructGenOreNests::OreInfo CoalVein;
- CoalVein.BlockType = E_BLOCK_COAL_ORE;
- CoalVein.MaxHeight = 127;
- CoalVein.NumNests = 50;
- CoalVein.NestSize = 10;
- Ores.push_back(CoalVein);
-
- // Iron vein
- cStructGenOreNests::OreInfo IronVein;
- IronVein.BlockType = E_BLOCK_IRON_ORE;
- IronVein.MaxHeight = 64;
- IronVein.NumNests = 14;
- IronVein.NestSize = 6;
- Ores.push_back(IronVein);
-
- // Gold vein
- cStructGenOreNests::OreInfo GoldVein;
- GoldVein.BlockType = E_BLOCK_GOLD_ORE;
- GoldVein.MaxHeight = 32;
- GoldVein.NumNests = 2;
- GoldVein.NestSize = 6;
- Ores.push_back(GoldVein);
-
- // Redstone vein
- cStructGenOreNests::OreInfo RedstoneVein;
- RedstoneVein.BlockType = E_BLOCK_REDSTONE_ORE;
- RedstoneVein.MaxHeight = 16;
- RedstoneVein.NumNests = 4;
- RedstoneVein.NestSize = 6;
- Ores.push_back(RedstoneVein);
-
- // Lapis vein
- cStructGenOreNests::OreInfo LapisVein;
- LapisVein.BlockType = E_BLOCK_LAPIS_ORE;
- LapisVein.MaxHeight = 30;
- LapisVein.NumNests = 2;
- LapisVein.NestSize = 5;
- Ores.push_back(LapisVein);
-
- // Diamond vein
- cStructGenOreNests::OreInfo DiamondVein;
- DiamondVein.BlockType = E_BLOCK_DIAMOND_ORE;
- DiamondVein.MaxHeight = 15;
- DiamondVein.NumNests = 1;
- DiamondVein.NestSize = 4;
- Ores.push_back(DiamondVein);
-
- m_FinishGens.push_back(cFinishGenPtr(new cStructGenOreNests(Seed, Ores, E_BLOCK_STONE)));
+ m_FinishGens.push_back(std::make_shared<cFinishGenOreNests>(Seed + 3, cFinishGenOreNests::DefaultOverworldOres()));
+ }
+ else if (NoCaseCompare(*itr, "OrePockets") == 0)
+ {
+ auto gen = std::make_shared<cFinishGenOrePockets>(Seed + 2, cFinishGenOrePockets::DefaultOverworldOres());
+ if (gen->Initialize(a_IniFile, "OrePockets"))
+ {
+ m_FinishGens.push_back(gen);
+ }
}
else if (NoCaseCompare(*itr, "POCPieces") == 0)
{