From 26ac146f41091dc070d8075f5fc9de25b5a22578 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 17 Apr 2020 11:36:37 +0200 Subject: More Vector3 in cBlockHandler (#4644) * cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works. --- src/ChunkMap.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ChunkMap.h') diff --git a/src/ChunkMap.h b/src/ChunkMap.h index 5c0aa7688..7096e3d70 100644 --- a/src/ChunkMap.h +++ b/src/ChunkMap.h @@ -373,8 +373,10 @@ public: Returns the number of stages the plant has grown, 0 if not a plant. */ int GrowPlantAt(Vector3i a_BlockPos, int a_NumStages = 1); - /** Sets the blockticking to start at the specified block. Only one blocktick per chunk may be set, second call overwrites the first call */ - void SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ); + /** Causes the specified block to be ticked on the next Tick() call. + Plugins can use this via the cWorld:SetNextBlockToTick() API. + Only one block coord per chunk may be set, a second call overwrites the first call */ + void SetNextBlockToTick(const Vector3i a_BlockPos); /** Make a Mob census, of all mobs, their family, their chunk and their distance to closest player */ void CollectMobCensus(cMobCensus & a_ToFill); @@ -385,7 +387,7 @@ public: void Tick(std::chrono::milliseconds a_Dt); /** Ticks a single block. Used by cWorld::TickQueuedBlocks() to tick the queued blocks */ - void TickBlock(int a_BlockX, int a_BlockY, int a_BlockZ); + void TickBlock(const Vector3i a_BlockPos); void UnloadUnusedChunks(void); void SaveAllChunks(void); -- cgit v1.2.3