Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | List of all members
cChunkGeneratorThread::cChunkSink Class Referenceabstract

The interface through which the generated chunks are handed to the cWorld or whoever created us. More...

#include <ChunkGeneratorThread.h>

Inheritance diagram for cChunkGeneratorThread::cChunkSink:
Inheritance graph
[legend]

Public Member Functions

virtual bool HasChunkAnyClients (cChunkCoords a_Coords)=0
 Called when the generator is overloaded to skip chunks that are no longer needed. More...
 
virtual bool IsChunkQueued (cChunkCoords a_Coords)=0
 Called to check whether the specified chunk is in the queued state. More...
 
virtual bool IsChunkValid (cChunkCoords a_Coords)=0
 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)=0
 Called after the chunk has been generated The interface may store the chunk, send it over network, whatever. More...
 
virtual ~cChunkSink ()
 

Detailed Description

The interface through which the generated chunks are handed to the cWorld or whoever created us.

Definition at line 49 of file ChunkGeneratorThread.h.

Constructor & Destructor Documentation

◆ ~cChunkSink()

virtual cChunkGeneratorThread::cChunkSink::~cChunkSink ( )
inlinevirtual

Definition at line 53 of file ChunkGeneratorThread.h.

Member Function Documentation

◆ HasChunkAnyClients()

virtual bool cChunkGeneratorThread::cChunkSink::HasChunkAnyClients ( cChunkCoords  a_Coords)
pure virtual

Called when the generator is overloaded to skip chunks that are no longer needed.

If this callback returns false, the chunk is not generated.

Implemented in cWorld::cChunkGeneratorCallbacks.

◆ IsChunkQueued()

virtual bool cChunkGeneratorThread::cChunkSink::IsChunkQueued ( cChunkCoords  a_Coords)
pure virtual

Called to check whether the specified chunk is in the queued state.

Currently used only in Debug-mode asserts.

Implemented in cWorld::cChunkGeneratorCallbacks.

◆ IsChunkValid()

virtual bool cChunkGeneratorThread::cChunkSink::IsChunkValid ( cChunkCoords  a_Coords)
pure virtual

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.

Implemented in cWorld::cChunkGeneratorCallbacks.

◆ OnChunkGenerated()

virtual void cChunkGeneratorThread::cChunkSink::OnChunkGenerated ( cChunkDesc a_ChunkDesc)
pure virtual

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.

Implemented in cWorld::cChunkGeneratorCallbacks.


The documentation for this class was generated from the following file: