Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <LightingThread.h>
Public Member Functions | |
cLightingChunkStay (cLightingThread &a_LightingThread, int a_ChunkX, int a_ChunkZ, std::unique_ptr< cChunkCoordCallback > a_CallbackAfter) | |
Public Member Functions inherited from cChunkStay | |
void | Add (int a_ChunkX, int a_ChunkZ) |
Adds a chunk to be locked from unloading. More... | |
cChunkStay (void) | |
void | Clear (void) |
Clears all the chunks that have been added. More... | |
virtual void | Disable (void) |
Disables the ChunkStay, the chunks are released and the ChunkStay object can be edited with Add() and Remove() again. More... | |
void | Enable (cChunkMap &a_ChunkMap) |
Enables the ChunkStay on the specified chunkmap, causing it to load and generate chunks. More... | |
const cChunkCoordsVector & | GetChunks (void) const |
Returns all the chunks that should be kept. More... | |
void | Remove (int a_ChunkX, int a_ChunkZ) |
Releases the chunk so that it's no longer locked from unloading. More... | |
virtual | ~cChunkStay () |
Deletes the object. More... | |
Public Attributes | |
std::unique_ptr< cChunkCoordCallback > | m_CallbackAfter |
int | m_ChunkX |
int | m_ChunkZ |
cLightingThread & | m_LightingThread |
Protected Member Functions | |
virtual bool | OnAllChunksAvailable (void) override |
Called once all of the contained chunks are available. More... | |
virtual void | OnChunkAvailable (int a_ChunkX, int a_ChunkZ) override |
Called when a specific chunk become available. More... | |
virtual void | OnDisabled (void) override |
Called by the ChunkMap when the ChunkStay is disabled. More... | |
Protected Member Functions inherited from cChunkStay | |
bool | ChunkAvailable (int a_ChunkX, int a_ChunkZ) |
Called by cChunkMap when a chunk is available, checks m_NumLoaded and triggers the appropriate callbacks. More... | |
Additional Inherited Members | |
Protected Attributes inherited from cChunkStay | |
cChunkMap * | m_ChunkMap |
The chunkmap where the object is enabled. More... | |
cChunkCoordsVector | m_Chunks |
The list of chunks to lock from unloading. More... | |
cChunkCoordsVector | m_OutstandingChunks |
The chunks that still need loading. More... | |
Definition at line 71 of file LightingThread.h.
cLightingThread::cLightingChunkStay::cLightingChunkStay | ( | cLightingThread & | a_LightingThread, |
int | a_ChunkX, | ||
int | a_ChunkZ, | ||
std::unique_ptr< cChunkCoordCallback > | a_CallbackAfter | ||
) |
Definition at line 590 of file LightingThread.cpp.
|
overrideprotectedvirtual |
Called once all of the contained chunks are available.
If returns true, the ChunkStay is automatically disabled by the ChunkMap; if it returns false, the ChunkStay is kept.
Implements cChunkStay.
Definition at line 611 of file LightingThread.cpp.
|
inlineoverrideprotectedvirtual |
Called when a specific chunk become available.
Implements cChunkStay.
Definition at line 83 of file LightingThread.h.
|
overrideprotectedvirtual |
Called by the ChunkMap when the ChunkStay is disabled.
The object may choose to delete itself.
Implements cChunkStay.
Definition at line 623 of file LightingThread.cpp.
std::unique_ptr<cChunkCoordCallback> cLightingThread::cLightingChunkStay::m_CallbackAfter |
Definition at line 78 of file LightingThread.h.
int cLightingThread::cLightingChunkStay::m_ChunkX |
Definition at line 76 of file LightingThread.h.
int cLightingThread::cLightingChunkStay::m_ChunkZ |
Definition at line 77 of file LightingThread.h.
cLightingThread& cLightingThread::cLightingChunkStay::m_LightingThread |
Definition at line 75 of file LightingThread.h.