1
0

More Vector3 in cBlockHandler (#4644)

* cBlockHandler.OnUpdate uses Vector3 params.

Also slightly changed how block ticking works.
This commit is contained in:
Mattes D
2020-04-17 11:36:37 +02:00
committed by GitHub
parent 96bd4637d7
commit 26ac146f41
27 changed files with 406 additions and 253 deletions

View File

@@ -590,9 +590,9 @@ bool cWorld::IsWeatherWetAtXYZ(Vector3i a_Pos)
void cWorld::SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ)
void cWorld::SetNextBlockToTick(const Vector3i a_BlockPos)
{
return m_ChunkMap->SetNextBlockTick(a_BlockX, a_BlockY, a_BlockZ);
return m_ChunkMap->SetNextBlockToTick(a_BlockPos);
}
@@ -3195,7 +3195,7 @@ void cWorld::TickQueuedBlocks(void)
if (Block->TicksToWait <= 0)
{
// TODO: Handle the case when the chunk is already unloaded
m_ChunkMap->TickBlock(Block->X, Block->Y, Block->Z);
m_ChunkMap->TickBlock({Block->X, Block->Y, Block->Z});
delete Block; // We don't have to remove it from the vector, this will happen automatically on the next tick
}
else