Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Implementation of the callbacks that the ChunkGenerator uses to store new chunks and interface to plugins. More...
Public Member Functions | |
cChunkGeneratorCallbacks (cWorld &a_World) | |
Public Member Functions inherited from cChunkGeneratorThread::cChunkSink | |
virtual | ~cChunkSink () |
Public Member Functions inherited from cChunkGeneratorThread::cPluginInterface | |
virtual | ~cPluginInterface () |
Private Member Functions | |
virtual void | CallHookChunkGenerated (cChunkDesc &a_ChunkDesc) override |
Called after the chunk is generated, before it is handed to the chunk sink. More... | |
virtual void | CallHookChunkGenerating (cChunkDesc &a_ChunkDesc) override |
Called when the chunk is about to be generated. More... | |
virtual bool | HasChunkAnyClients (cChunkCoords a_Coords) override |
Called when the generator is overloaded to skip chunks that are no longer needed. More... | |
virtual bool | IsChunkQueued (cChunkCoords a_Coords) override |
Called to check whether the specified chunk is in the queued state. More... | |
virtual bool | IsChunkValid (cChunkCoords a_Coords) override |
Called just before the chunk generation is started, to verify that it hasn't been generated in the meantime. More... | |
virtual void | OnChunkGenerated (cChunkDesc &a_ChunkDesc) override |
Called after the chunk has been generated The interface may store the chunk, send it over network, whatever. More... | |
Private Attributes | |
cWorld * | m_World |
Implementation of the callbacks that the ChunkGenerator uses to store new chunks and interface to plugins.
cWorld::cChunkGeneratorCallbacks::cChunkGeneratorCallbacks | ( | cWorld & | a_World | ) |
|
overrideprivatevirtual |
Called after the chunk is generated, before it is handed to the chunk sink.
a_ChunkDesc contains the generated chunk data. Implementation may modify this data.
Implements cChunkGeneratorThread::cPluginInterface.
|
overrideprivatevirtual |
Called when the chunk is about to be generated.
The generator may be partly or fully overriden by the implementation.
Implements cChunkGeneratorThread::cPluginInterface.
|
overrideprivatevirtual |
Called when the generator is overloaded to skip chunks that are no longer needed.
If this callback returns false, the chunk is not generated.
Implements cChunkGeneratorThread::cChunkSink.
|
overrideprivatevirtual |
Called to check whether the specified chunk is in the queued state.
Currently used only in Debug-mode asserts.
Implements cChunkGeneratorThread::cChunkSink.
|
overrideprivatevirtual |
Called just before the chunk generation is started, to verify that it hasn't been generated in the meantime.
If this callback returns true, the chunk is not generated.
Implements cChunkGeneratorThread::cChunkSink.
|
overrideprivatevirtual |
Called after the chunk has been generated The interface may store the chunk, send it over network, whatever.
The chunk is not expected to be modified, but the generator will survive if the implementation changes the data within. All changes are ignored, though.
Implements cChunkGeneratorThread::cChunkSink.