Increased Type safety of Biomes
Changed a number of funcictions from using integers to store biomes to using EMCSBiome Note that switching from an int to an Enum is a non-breaking chang to the lua bindings
This commit is contained in:
@@ -1222,7 +1222,7 @@ void cWorld::GrowTreeByBiome(int a_X, int a_Y, int a_Z)
|
||||
{
|
||||
cNoise Noise(m_Generator.GetSeed());
|
||||
sSetBlockVector Logs, Other;
|
||||
GetTreeImageByBiome(a_X, a_Y, a_Z, Noise, (int)(m_WorldAge & 0xffffffff), (EMCSBiome)GetBiomeAt(a_X, a_Z), Logs, Other);
|
||||
GetTreeImageByBiome(a_X, a_Y, a_Z, Noise, (int)(m_WorldAge & 0xffffffff), GetBiomeAt(a_X, a_Z), Logs, Other);
|
||||
Other.insert(Other.begin(), Logs.begin(), Logs.end());
|
||||
Logs.clear();
|
||||
GrowTreeImage(Other);
|
||||
@@ -1475,7 +1475,7 @@ void cWorld::GrowSugarcane(int a_BlockX, int a_BlockY, int a_BlockZ, int a_NumBl
|
||||
|
||||
|
||||
|
||||
int cWorld::GetBiomeAt (int a_BlockX, int a_BlockZ)
|
||||
EMCSBiome cWorld::GetBiomeAt (int a_BlockX, int a_BlockZ)
|
||||
{
|
||||
return m_ChunkMap->GetBiomeAt(a_BlockX, a_BlockZ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user