Cuberite Forum
cChunk is not to be u sed directly? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: cChunk is not to be u sed directly? (/thread-2412.html)



cChunk is not to be u sed directly? - LogicParrot - 03-28-2016

In the header of the cChunk class, I noticed this comment:

Quote:This class is not to be used directly, instead call actions on cChunkMap (such as cChunkMap::SetBlock()

This is far from reality. cChunk is used directly everywhere. Is this comment up to date?


RE: cChunk is not to be u sed directly? - tigerw - 04-01-2016

It can only be used directly when cChunkMap's mutual exclusion is locked. After #3115, it can only be used within the context of the owning chunkmap's owning world's tick thread.

It's sort of up to date.