5 #include "../Defines.h" 10 #pragma clang diagnostic ignored "-Wweak-template-vtables" 46 area.
Expand(1, 1, 1, 1, 1, 1);
60 LOGWARNING(
"%s: Trying to wake up inside a non-valid chunk [%d, %d]. Ignoring.",
69 for (
int y = area.
p1.
y; y <= area.
p2.
y; ++y)
71 for (
int z = startZ; z <= endZ; ++z)
73 for (
int x = startX; x <= endX; ++x)
bool IsValid(void) const
Returns true iff the chunk block data is valid (loaded / generated)
virtual void AddBlock(Vector3i a_Block, cChunk *a_Chunk)=0
Called to simulate a new block.
bool DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback a_Callback)
Calls the callback for the chunk specified, with ChunkMapCS locked.
void WakeUpArea(const cCuboid &a_Area)
Does the same processing as WakeUp, but for all blocks within the specified area. ...
static void BlockToChunk(int a_X, int a_Z, int &a_ChunkX, int &a_ChunkZ)
Converts absolute block coords to chunk coords:
void WakeUp(Vector3i a_Block, cChunk *a_Chunk)
Called when a block changes.
void LOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
void Expand(int a_SubMinX, int a_AddMaxX, int a_SubMinY, int a_AddMaxY, int a_SubMinZ, int a_AddMaxZ)
Expands the cuboid by the specified amount in each direction.
cChunk * GetNeighborChunk(int a_BlockX, int a_BlockZ)
Returns the chunk into which the specified block belongs, by walking the neighbors.
void ClampY(int a_MinY, int a_MaxY)
Clamps both Y coords to the specified range.