From 66e73a2d682f02224a2c84319f6db03964ecbac2 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 24 Sep 2019 14:20:50 +0200 Subject: NBTChunkSerializer: Cleaned up interface. Removed dependency on cChunkDataCallback. Moved all the serializing code into a worker class. Changed the serialization into a single-call action. --- src/World.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 26e108e80..3ffbfecf0 100644 --- a/src/World.h +++ b/src/World.h @@ -234,7 +234,9 @@ public: const cChunkDef::BlockNibbles & a_SkyLight ); - bool GetChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataCallback & a_Callback); + /** Calls the callback with the chunk's data, if available (with ChunkCS locked). + Returns true if the chunk was reported successfully, false if not (chunk not present or callback failed). */ + bool GetChunkData(cChunkCoords a_Coords, cChunkDataCallback & a_Callback) const; /** Gets the chunk's blocks, only the block types */ bool GetChunkBlockTypes(int a_ChunkX, int a_ChunkZ, BLOCKTYPE * a_BlockTypes); -- cgit v1.2.3