31 #include <unordered_set> 32 #include <unordered_map> 106 m_Priority(a_Priority)
115 std::unordered_map<cChunkCoords, sSendChunk, cChunkCoordsHash>
m_ChunkInfo;
126 virtual void Execute(
void)
override;
135 void SendChunk(
int a_ChunkX,
int a_ChunkZ, std::unordered_set<cClientHandle *> a_Clients);
std::unordered_set< cClientHandle * > m_Clients
cChunkSender(cWorld &a_World)
void SendChunk(int a_ChunkX, int a_ChunkZ, std::unordered_set< cClientHandle * > a_Clients)
Sends the specified chunk to all the specified clients.
eChunkPriority m_Priority
sSendChunk(cChunkCoords a_Chunk, eChunkPriority a_Priority)
A simple implementation of the cChunkDataCallback interface that just copies the cChunkData.
unsigned char m_BiomeMap[cChunkDef::Width *cChunkDef::Width]
eChunkPriority m_Priority
bool operator<(const sChunkQueue &a_Other) const
Used for sending chunks to specific clients.
std::vector< Vector3i > m_BlockEntities
virtual void BiomeData(const cChunkDef::BiomeMap *a_BiomeMap) override
std::priority_queue< sChunkQueue > m_SendChunks
std::unordered_map< cChunkCoords, sSendChunk, cChunkCoordsHash > m_ChunkInfo
void RemoveClient(cClientHandle *a_Client)
Removes the a_Client from all waiting chunk send operations.
virtual ~cChunkSender() override
virtual void Entity(cEntity *a_Entity) override
virtual void BlockEntity(cBlockEntity *a_Entity) override
virtual void Execute(void) override
This is the main thread entrypoint.
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
void QueueSendChunkTo(int a_ChunkX, int a_ChunkZ, eChunkPriority a_Priority, cClientHandle *a_Client)
Queues a chunk to be sent to a specific client.
Non-owning view of a chunk's client handles.