diff options
author | Mattes D <github@xoft.cz> | 2015-11-25 09:22:13 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-11-25 09:22:20 +0100 |
commit | f2a8d5c0472ee465edb1d2eed38f4e5454f037ab (patch) | |
tree | 4b355cc97ddf4b093e1acff47f858dfedb89af5d /src/Generating/ComposableGenerator.cpp | |
parent | Merge pull request #2687 from Gargaj/signfix (diff) | |
download | cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar.gz cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar.bz2 cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar.lz cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar.xz cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.tar.zst cuberite-f2a8d5c0472ee465edb1d2eed38f4e5454f037ab.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/ComposableGenerator.cpp | 124 |
1 files changed, 15 insertions, 109 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index eb1d0e1ee..3e27280ce 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -330,6 +330,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(cFinishGenPtr(new cStructGenDirectOverhangs(Seed))); } + else if (NoCaseCompare(*itr, "DirtPockets") == 0) + { + m_FinishGens.push_back(std::make_shared<cFinishGenOrePockets>(Seed + 1, cFinishGenOrePockets::DefaultNaturalPatches())); + } else if (NoCaseCompare(*itr, "DistortedMembraneOverhangs") == 0) { m_FinishGens.push_back(cFinishGenPtr(new cStructGenDistortedMembraneOverhangs(Seed))); @@ -397,52 +401,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 +416,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)) + { + m_FinishGens.push_back(gen); + } } else if (NoCaseCompare(*itr, "POCPieces") == 0) { |