summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 01:44:18 +0100
committerp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 01:44:18 +0100
commit53a33595b7c53d3728cc38627a3d0601fce735aa (patch)
tree52b9d7793f14ae4611f7076061aa875fdc70e702 /src/Generating
parentformat blocks and randomizing (diff)
downloadcuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar.gz
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar.bz2
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar.lz
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar.xz
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.tar.zst
cuberite-53a33595b7c53d3728cc38627a3d0601fce735aa.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index e72e91c85..e50942073 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -1049,12 +1049,14 @@ bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX
{
return false;
}
- if ((BlockUnderFeet != E_BLOCK_GRASS) &&
- ((AnimalToSpawn == mtSheep) || (AnimalToSpawn == mtChicken) || (AnimalToSpawn == mtPig)))
+ if (
+ (BlockUnderFeet != E_BLOCK_GRASS) &&
+ ((AnimalToSpawn == mtSheep) || (AnimalToSpawn == mtChicken) || (AnimalToSpawn == mtPig))
+ )
{
return false;
}
- if (AnimalToSpawn == mtMooshroom && BlockUnderFeet != E_BLOCK_MYCELIUM)
+ if ((AnimalToSpawn == mtMooshroom) && (BlockUnderFeet != E_BLOCK_MYCELIUM))
{
return false;
}
@@ -1150,13 +1152,18 @@ eMonsterType cFinishGenPassiveMobs::GetRandomMob(cChunkDesc & a_ChunkDesc)
}
}
+ ListOfSpawnables.insert(MobIter, mtChicken);
+ ListOfSpawnables.insert(MobIter, mtCow);
+ ListOfSpawnables.insert(MobIter, mtPig);
+ ListOfSpawnables.insert(MobIter, mtSheep);
+
if (ListOfSpawnables.empty())
{
return mtInvalidType;
}
int RandMob = (m_Noise.IntNoise2DInt(chunkX - chunkZ + 2, chunkX + 5) / 7) % ListOfSpawnables.size();
- MobIter=ListOfSpawnables.begin();
+ MobIter = ListOfSpawnables.begin();
for (int i = 0; i < RandMob; i++)
{
++MobIter;