summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp35
1 files changed, 27 insertions, 8 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 4077fd98e..78b28bff5 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -1615,14 +1615,15 @@ const cFinishGenOres::OreInfos & cFinishGenOres::DefaultOverworldOres(void)
{
static OreInfos res
{
- // OreType, OreMeta, MaxHeight, NumNests, NestSize
- {E_BLOCK_COAL_ORE, 0, 127, 20, 16},
- {E_BLOCK_IRON_ORE, 0, 64, 20, 8},
- {E_BLOCK_GOLD_ORE, 0, 32, 2, 8},
- {E_BLOCK_REDSTONE_ORE, 0, 16, 8, 7},
- {E_BLOCK_DIAMOND_ORE, 0, 15, 1, 7},
- {E_BLOCK_LAPIS_ORE, 0, 30, 1, 6},
- {E_BLOCK_EMERALD_ORE, 0, 32, 11, 1},
+ // OreType, OreMeta, MaxHeight, NumNests, NestSize
+ {E_BLOCK_COAL_ORE, 0, 127, 20, 16},
+ {E_BLOCK_IRON_ORE, 0, 64, 20, 8},
+ {E_BLOCK_GOLD_ORE, 0, 32, 2, 8},
+ {E_BLOCK_REDSTONE_ORE, 0, 16, 8, 7},
+ {E_BLOCK_DIAMOND_ORE, 0, 15, 1, 7},
+ {E_BLOCK_LAPIS_ORE, 0, 30, 1, 6},
+ {E_BLOCK_EMERALD_ORE, 0, 32, 11, 1},
+ {E_BLOCK_SILVERFISH_EGG, 0, 64, 7, 9},
};
return res;
}
@@ -1792,6 +1793,24 @@ void cFinishGenOreNests::GenerateOre(
}
}
+ if (a_OreType == E_BLOCK_SILVERFISH_EGG)
+ {
+ const auto BiomeSampleOne = a_ChunkDesc.GetBiome( 4, 4);
+ const auto BiomeSampleTwo = a_ChunkDesc.GetBiome( 4, 12);
+ const auto BiomeSampleThree = a_ChunkDesc.GetBiome(12, 4);
+ const auto BiomeSampleFour = a_ChunkDesc.GetBiome(12, 12);
+
+ if (
+ !IsBiomeMountain(BiomeSampleOne) &&
+ !IsBiomeMountain(BiomeSampleTwo) &&
+ !IsBiomeMountain(BiomeSampleThree) &&
+ !IsBiomeMountain(BiomeSampleFour)
+ )
+ {
+ return;
+ }
+ }
+
auto chunkX = a_ChunkDesc.GetChunkX();
auto chunkZ = a_ChunkDesc.GetChunkZ();
auto & blockTypes = a_ChunkDesc.GetBlockTypes();