|
bool | AddClient (cClientHandle *a_Client) |
| Adds a client to the chunk; returns true if added, false if already there. More...
|
|
void | AddEntity (OwnedEntity a_Entity) |
|
void | BroadcastPendingChanges (void) |
| Flushes the pending block (entity) queue, and clients' outgoing data buffers. More...
|
|
bool | CanUnload (void) const |
|
bool | CanUnloadAfterSaving (void) const |
| Returns true if the chunk could have been unloaded if it weren't dirty. More...
|
|
| cChunk (const cChunk &Other)=delete |
|
| cChunk (int a_ChunkX, int a_ChunkZ, cChunkMap *a_ChunkMap, cWorld *a_World) |
|
void | CollectMobCensus (cMobCensus &toFill) |
| Recence all mobs proximities to players in order to know what to do with them. More...
|
|
bool | DoWithBlockEntityAt (Vector3i a_Position, cBlockEntityCallback a_Callback) |
| Calls the callback for the block entity at the specified coords; returns false if there's no block entity at those coords, and whatever the callback returns if found. More...
|
|
bool | DoWithEntityByID (UInt32 a_EntityID, cEntityCallback a_Callback, bool &a_CallbackResult) const |
| Calls the callback if the entity with the specified ID is found, with the entity object as the callback param. More...
|
|
void | FastSetBlock (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta) |
|
void | FastSetBlock (Vector3i a_RelPos, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta) |
|
bool | ForEachBlockEntity (cBlockEntityCallback a_Callback) |
| Calls the callback for each block entity; returns true if all block entities processed, false if the callback aborted by returning true. More...
|
|
bool | ForEachEntity (cEntityCallback a_Callback) const |
| Calls the callback for each entity; returns true if all entities processed, false if the callback aborted by returning true. More...
|
|
bool | ForEachEntityInBox (const cBoundingBox &a_Box, cEntityCallback a_Callback) const |
| Calls the callback for each entity that has a nonempty intersection with the specified boundingbox. More...
|
|
const auto & | GetAllClients (void) const |
|
void | GetAllData (cChunkDataCallback &a_Callback) const |
| Gets all chunk data, calls the a_Callback's methods for each data type. More...
|
|
EMCSBiome | GetBiomeAt (int a_RelX, int a_RelZ) const |
|
BLOCKTYPE | GetBlock (int a_RelX, int a_RelY, int a_RelZ) const |
|
BLOCKTYPE | GetBlock (Vector3i a_RelCoords) const |
|
cBlockEntity * | GetBlockEntity (int a_BlockX, int a_BlockY, int a_BlockZ) |
| OBSOLETE, use the Vector3i-based overload instead. More...
|
|
cBlockEntity * | GetBlockEntity (Vector3i a_AbsPos) |
| Returns the block entity at the specified (absolute) coords. More...
|
|
cBlockEntity * | GetBlockEntityRel (Vector3i a_RelPos) |
| Returns the block entity at the specified (relative) coords. More...
|
|
void | GetBlockInfo (Vector3i a_RelPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_Meta, NIBBLETYPE &a_SkyLight, NIBBLETYPE &a_BlockLight) const |
|
NIBBLETYPE | GetBlockLight (int a_RelX, int a_RelY, int a_RelZ) const |
|
NIBBLETYPE | GetBlockLight (Vector3i a_RelPos) const |
| Get the level of artificial light illuminating the block (0 - 15) More...
|
|
void | GetBlockTypeMeta (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const |
|
void | GetBlockTypeMeta (Vector3i a_RelPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const |
|
bool | GetChunkAndRelByAbsolute (const Vector3d &a_Position, cChunk **a_Chunk, Vector3i &a_Rel) |
| Convert absolute coordinates into relative coordinates. More...
|
|
bool | GetChunkAndRelByAbsolute (const Vector3i &a_Position, cChunk **a_Chunk, Vector3i &a_Rel) |
| Convert absolute coordinates into relative coordinates. More...
|
|
cFireSimulatorChunkData & | GetFireSimulatorData (void) |
|
int | GetHeight (int a_X, int a_Z) const |
|
cFluidSimulatorData * | GetLavaSimulatorData (void) const |
|
NIBBLETYPE | GetMeta (int a_RelX, int a_RelY, int a_RelZ) const |
|
NIBBLETYPE | GetMeta (Vector3i a_RelPos) const |
|
cChunk * | GetNeighborChunk (int a_BlockX, int a_BlockZ) |
| Returns the chunk into which the specified block belongs, by walking the neighbors. More...
|
|
cChunkCoords | GetPos () const |
|
int | GetPosX (void) const |
|
int | GetPosZ (void) const |
|
cRedstoneSimulatorChunkData * | GetRedstoneSimulatorData (void) const |
|
cChunk * | GetRelNeighborChunk (int a_RelX, int a_RelZ) |
| Returns the chunk into which the relatively-specified block belongs, by walking the neighbors. More...
|
|
cChunk * | GetRelNeighborChunkAdjustCoords (Vector3i &a_RelPos) const |
| Returns the chunk into which the relatively-specified block belongs. More...
|
|
cSandSimulatorChunkData & | GetSandSimulatorData (void) |
|
NIBBLETYPE | GetSkyLight (int a_RelX, int a_RelY, int a_RelZ) const |
|
NIBBLETYPE | GetSkyLight (Vector3i a_RelPos) const |
| Get the level of sky light illuminating the block (0 - 15) independent of daytime. More...
|
|
NIBBLETYPE | GetSkyLightAltered (int a_RelX, int a_RelY, int a_RelZ) const |
|
NIBBLETYPE | GetSkyLightAltered (Vector3i a_RelPos) const |
| Get the level of sky light illuminating the block (0 - 15), taking daytime into a account. More...
|
|
NIBBLETYPE | GetTimeAlteredLight (NIBBLETYPE a_Skylight) const |
| Light alterations based on time. More...
|
|
cFluidSimulatorData * | GetWaterSimulatorData (void) const |
|
cWorld * | GetWorld (void) const |
|
bool | HasAnyClients (void) const |
| Returns true if theres any client in the chunk; false otherwise. More...
|
|
bool | HasClient (cClientHandle *a_Client) |
| Returns true if the specified client is present in this chunk. More...
|
|
bool | HasEntity (UInt32 a_EntityID) const |
|
bool | IsDirty (void) const |
| Returns true iff the chunk has changed since it was last saved. More...
|
|
bool | IsLightValid (void) const |
|
bool | IsQueued (void) const |
| Returns true iff the chunk is in the queue for loading / generating. More...
|
|
bool | IsSlimeChunk () const |
| Returns true if slimes should spawn in the chunk. More...
|
|
bool | IsValid (void) const |
| Returns true iff the chunk block data is valid (loaded / generated) More...
|
|
bool | IsWeatherSunnyAt (int a_RelX, int a_RelZ) const |
| Returns true if it is sunny at the specified location. More...
|
|
bool | IsWeatherWetAt (int a_RelX, int a_RelZ) const |
| Returns true if it is raining or storming at the specified location, taking into account biomes. More...
|
|
bool | IsWeatherWetAt (Vector3i a_Position) const |
| Returns true if it is raining or storming at the specified location, and the rain reaches (the bottom of) the specified block position. More...
|
|
void | MarkDirty (void) |
|
void | MarkLoaded (void) |
|
void | MarkLoadFailed (void) |
| Queues the chunk for generating. More...
|
|
void | MarkRegenerating (void) |
| Marks all clients attached to this chunk as wanting this chunk. More...
|
|
void | MarkSaved (void) |
|
void | MarkSaving (void) |
|
void | OnUnload () |
| Called when the chunkmap unloads unused chunks. More...
|
|
Vector3i | PositionToWorldPosition (int a_RelX, int a_RelY, int a_RelZ) |
|
void | PositionToWorldPosition (int a_RelX, int a_RelY, int a_RelZ, int &a_BlockX, int &a_BlockY, int &a_BlockZ) |
|
Vector3i | PositionToWorldPosition (Vector3i a_RelPos) |
|
Vector3i | RelativeToAbsolute (Vector3i a_RelBlockPosition) const |
| Converts the coord relative to this chunk into an absolute coord. More...
|
|
void | RemoveClient (cClientHandle *a_Client) |
| Removes the specified client from the chunk; ignored if client not in chunk. More...
|
|
OwnedEntity | RemoveEntity (cEntity &a_Entity) |
| Releases ownership of the given entity if it was found in this chunk. More...
|
|
void | SendBlockEntity (int a_BlockX, int a_BlockY, int a_BlockZ, cClientHandle &a_Client) |
|
void | SendBlockTo (int a_RelX, int a_RelY, int a_RelZ, cClientHandle *a_Client) |
|
void | SetAllData (SetChunkData &&a_SetChunkData) |
| Sets all chunk data as either loaded from the storage or generated. More...
|
|
void | SetAlwaysTicked (bool a_AlwaysTicked) |
| Increments (a_AlwaysTicked == true) or decrements (false) the m_AlwaysTicked counter. More...
|
|
void | SetAreaBiome (int a_MinRelX, int a_MaxRelX, int a_MinRelZ, int a_MaxRelZ, EMCSBiome a_Biome) |
| Sets the biome in the specified relative coords area. More...
|
|
void | SetBiomeAt (int a_RelX, int a_RelZ, EMCSBiome a_Biome) |
| Sets the biome at the specified relative coords. More...
|
|
void | SetBlock (Vector3i a_RelBlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
|
void | SetLight (const cChunkDef::BlockNibbles &a_BlockLight, const cChunkDef::BlockNibbles &a_SkyLight) |
|
void | SetMeta (int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta) |
|
void | SetMeta (Vector3i a_RelPos, NIBBLETYPE a_Meta) |
|
void | SetNextBlockToTick (const Vector3i a_RelPos) |
| Causes the specified block to be ticked on the next Tick() call. More...
|
|
void | SetPresence (ePresence a_Presence) |
| Sets the chunk's presence. More...
|
|
bool | ShouldBeTicked (void) const |
| Returns true if the chunk should be ticked in the tick-thread. More...
|
|
void | SpawnMobs (cMobSpawner &a_MobSpawner) |
| Try to Spawn Monsters inside chunk. More...
|
|
void | Stay (bool a_Stay=true) |
| Sets or resets the internal flag that prevents chunk from being unloaded. More...
|
|
void | Tick (std::chrono::milliseconds a_Dt) |
|
void | TickBlock (const Vector3i a_RelPos) |
| Ticks a single block. More...
|
|
bool | UnboundedRelFastSetBlock (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelFastSetBlock (Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| Same as FastSetBlock(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlock (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlock (Vector3i a_RelCoords, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const |
| Same as GetBlock(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlockBlockLight (int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockLight) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlockBlockLight (Vector3i a_RelPos, NIBBLETYPE &a_BlockLight) const |
| Same as GetBlockBlockLight(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlockLights (int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockLight, NIBBLETYPE &a_SkyLight) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlockLights (Vector3i a_RelPos, NIBBLETYPE &a_BlockLight, NIBBLETYPE &a_SkyLight) const |
| Queries both BlockLight and SkyLight, relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlockMeta (int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockMeta) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlockMeta (Vector3i a_RelPos, NIBBLETYPE &a_BlockMeta) const |
| Same as GetBlockMeta(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlockSkyLight (int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_SkyLight) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlockSkyLight (Vector3i a_RelPos, NIBBLETYPE &a_SkyLight) const |
| Same as GetBlockSkyLight(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelGetBlockType (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType) const |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelGetBlockType (Vector3i a_RelCoords, BLOCKTYPE &a_BlockType) const |
| Same as GetBlockType(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UnboundedRelSetBlock (int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| OBSOLETE, use the Vector3i-based overload. More...
|
|
bool | UnboundedRelSetBlock (Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| Same as SetBlock(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in such a case) Returns true on success, false if queried chunk not loaded. More...
|
|
bool | UseBlockEntity (cPlayer *a_Player, int a_X, int a_Y, int a_Z) |
| Use block entity on coordinate. More...
|
|
void | WriteBlockArea (cBlockArea &a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes) |
| Writes the specified cBlockArea at the coords specified. More...
|
|
| ~cChunk () |
|