1
0

animal terrain finisher

This commit is contained in:
p-mcgowan 2014-12-02 01:58:30 -08:00
parent 9831220a1c
commit 2d93274a90
2 changed files with 169 additions and 169 deletions

View File

@ -962,7 +962,7 @@ cFinishGenPassiveMobs::cFinishGenPassiveMobs(int a_Seed, cIniFile & a_IniFile, e
break; break;
} }
case dimNether: case dimNether:
case dimEnd: // No nether or end animals (currently) case dimEnd:// No nether or end animals (currently)
{ {
DefaultAnimalSpawnChunkPercentage = DEF_NO_ANIMALS; DefaultAnimalSpawnChunkPercentage = DEF_NO_ANIMALS;
break; break;
@ -972,7 +972,7 @@ cFinishGenPassiveMobs::cFinishGenPassiveMobs(int a_Seed, cIniFile & a_IniFile, e
ASSERT(!"Unhandled world dimension"); ASSERT(!"Unhandled world dimension");
break; break;
} }
} // switch (dimension) }// switch (dimension)
m_AnimalProbability = a_IniFile.GetValueSetI(SectionName, "AnimalSpawnChunkPercentage", DefaultAnimalSpawnChunkPercentage); m_AnimalProbability = a_IniFile.GetValueSetI(SectionName, "AnimalSpawnChunkPercentage", DefaultAnimalSpawnChunkPercentage);
if (m_AnimalProbability < 0 || m_AnimalProbability > 100) if (m_AnimalProbability < 0 || m_AnimalProbability > 100)
{ {
@ -1015,8 +1015,8 @@ void cFinishGenPassiveMobs::GenFinish(cChunkDesc & a_ChunkDesc)
return; return;
} // if pack center spawn successful }// if pack center spawn successful
} // for tries }// for tries
} }
@ -1026,7 +1026,7 @@ void cFinishGenPassiveMobs::GenFinish(cChunkDesc & a_ChunkDesc)
bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX, int a_RelY, int a_RelZ, eMonsterType AnimalToSpawn) bool cFinishGenPassiveMobs::TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int a_RelX, int a_RelY, int a_RelZ, eMonsterType AnimalToSpawn)
{ {
BLOCKTYPE BlockAtHead = a_ChunkDesc.GetBlockType(a_RelX, a_RelY + 1, a_RelZ); BLOCKTYPE BlockAtHead = a_ChunkDesc.GetBlockType(a_RelX, a_RelY + 1, a_RelZ);
BLOCKTYPE BlockAtFeet = a_ChunkDesc.GetBlockType(a_RelX, a_RelY , a_RelZ); BLOCKTYPE BlockAtFeet = a_ChunkDesc.GetBlockType(a_RelX, a_RelY, a_RelZ);
BLOCKTYPE BlockUnderFeet = a_ChunkDesc.GetBlockType(a_RelX, a_RelY - 1, a_RelZ); BLOCKTYPE BlockUnderFeet = a_ChunkDesc.GetBlockType(a_RelX, a_RelY - 1, a_RelZ);
// Check block below (opaque, grass, water), and above (air) // Check block below (opaque, grass, water), and above (air)