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