summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-10-11 17:27:41 +0200
committerGitHub <noreply@github.com>2020-10-11 17:27:41 +0200
commitc080f819d2af3cc8c71d39c222a249e4df5e6f67 (patch)
tree94dc27dacbd040be12348150914d0d7ff1d42d91 /src/Generating
parentCorrected invalid syntax for return types in APIDoc (#4989) (diff)
downloadcuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar.gz
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar.bz2
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar.lz
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar.xz
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.tar.zst
cuberite-c080f819d2af3cc8c71d39c222a249e4df5e6f67.zip
Diffstat (limited to 'src/Generating')
-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();