ChunkManager.getOrCreateWriteBuffer

Returns writeable copy of current chunk snapshot. This buffer is valid until commit. After commit this buffer becomes next immutable snapshot. Returns null if chunk is not added and/or not loaded. If write buffer was not yet created then it is created based on policy.

If allowNonLoaded is enabled, then will create write buffer even if chunk is in non_loaded state. Useful for offline generation and conversion tools that write directly to chunk manager. You can write all chunk at once and then commit. Internal user will prevent write buffers from unloading. And on commit a save will be performed automatically.

BUG: returned pointer points inside hash table. If new write buffer is added hash table can reallocate. Do not use more than one write buffer at a time. Reallocation can prevent changes to buffers obtained earlier than reallocation to be invisible.

class ChunkManager
getOrCreateWriteBuffer

Meta