Add enhanced Gold generation in Mesa-Type Biomes (#4821)
* added enhanced gold generation in mesa-type-biomes * fixed typo in comment * added enhanced gold generation in mesa biomes - fixed small checkstyle errors Co-authored-by: 12xx12 <12xx12100@gmail.com>
This commit is contained in:
parent
3986059866
commit
47f7727b7f
@ -13647,6 +13647,23 @@ end
|
|||||||
},
|
},
|
||||||
Notes = "Returns true if the biome is mountainous (mutations of the extreme hills biome)."
|
Notes = "Returns true if the biome is mountainous (mutations of the extreme hills biome)."
|
||||||
},
|
},
|
||||||
|
IsBiomeMesa =
|
||||||
|
{
|
||||||
|
Params =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Name = "Biome",
|
||||||
|
Type = "EMCSBiome",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Returns =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Type = "boolean",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Notes = "Returns true if the biome is type of Mesa (mutations of the Mesa biome)."
|
||||||
|
},
|
||||||
IsValidBlock =
|
IsValidBlock =
|
||||||
{
|
{
|
||||||
Params =
|
Params =
|
||||||
|
@ -246,6 +246,30 @@ bool IsBiomeMountain(EMCSBiome a_Biome)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
bool IsBiomeMesa(EMCSBiome a_Biome)
|
||||||
|
{
|
||||||
|
switch (a_Biome)
|
||||||
|
{
|
||||||
|
case biMesa:
|
||||||
|
case biMesaPlateauF:
|
||||||
|
case biMesaPlateau:
|
||||||
|
case biMesaBryce:
|
||||||
|
case biMesaPlateauFM:
|
||||||
|
case biMesaPlateauM:
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int GetSnowStartHeight(EMCSBiome a_Biome)
|
int GetSnowStartHeight(EMCSBiome a_Biome)
|
||||||
{
|
{
|
||||||
switch (a_Biome)
|
switch (a_Biome)
|
||||||
|
@ -154,6 +154,9 @@ extern bool IsBiomeCold(EMCSBiome a_Biome);
|
|||||||
/** Returns true if the biome is mountainous (mutations of the extreme hills biome) */
|
/** Returns true if the biome is mountainous (mutations of the extreme hills biome) */
|
||||||
extern bool IsBiomeMountain(EMCSBiome a_Biome);
|
extern bool IsBiomeMountain(EMCSBiome a_Biome);
|
||||||
|
|
||||||
|
/** Returns true if the biome is Mesa or one of its mutations. */
|
||||||
|
extern bool IsBiomeMesa(EMCSBiome a_Biome);
|
||||||
|
|
||||||
/** Returns the height when a biome when a biome starts snowing. */
|
/** Returns the height when a biome when a biome starts snowing. */
|
||||||
extern int GetSnowStartHeight(EMCSBiome a_Biome);
|
extern int GetSnowStartHeight(EMCSBiome a_Biome);
|
||||||
|
|
||||||
|
@ -1769,6 +1769,27 @@ void cFinishGenOreNests::GenerateOre(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Gold ores are generated more often in Mesa-Type-Biomes:
|
||||||
|
// https://minecraft.gamepedia.com/Gold_Ore
|
||||||
|
if (a_OreType == E_BLOCK_GOLD_ORE)
|
||||||
|
{
|
||||||
|
auto BiomeSampleOne = a_ChunkDesc.GetBiome( 4, 4);
|
||||||
|
auto BiomeSampleTwo = a_ChunkDesc.GetBiome( 4, 12);
|
||||||
|
auto BiomeSampleThree = a_ChunkDesc.GetBiome(12, 4);
|
||||||
|
auto BiomeSampleFour = a_ChunkDesc.GetBiome(12, 12);
|
||||||
|
|
||||||
|
if (
|
||||||
|
IsBiomeMesa(BiomeSampleOne) ||
|
||||||
|
IsBiomeMesa(BiomeSampleTwo) ||
|
||||||
|
IsBiomeMesa(BiomeSampleThree) ||
|
||||||
|
IsBiomeMesa(BiomeSampleFour)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
a_MaxHeight = 76;
|
||||||
|
a_NumNests = 22; // 2 time default + 20 times mesa bonus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto chunkX = a_ChunkDesc.GetChunkX();
|
auto chunkX = a_ChunkDesc.GetChunkX();
|
||||||
auto chunkZ = a_ChunkDesc.GetChunkZ();
|
auto chunkZ = a_ChunkDesc.GetChunkZ();
|
||||||
auto & blockTypes = a_ChunkDesc.GetBlockTypes();
|
auto & blockTypes = a_ChunkDesc.GetBlockTypes();
|
||||||
|
Loading…
Reference in New Issue
Block a user