26 class cChunkDataCallback;
43 #define PREPARE_REL_AND_CHUNK(Position, OriginalChunk) cChunk * Chunk; Vector3i Rel; bool RelSuccess = (OriginalChunk).GetChunkAndRelByAbsolute(Position, &Chunk, Rel) 44 #define PREPARE_BLOCKDATA BLOCKTYPE BlockType; NIBBLETYPE BlockMeta; 63 int a_ChunkX,
int a_ChunkZ,
113 void GetAllData(cChunkDataCallback & a_Callback);
137 void Stay(
bool a_Stay =
true);
145 void Tick(std::chrono::milliseconds a_Dt);
148 void TickBlock(
int a_RelX,
int a_RelY,
int a_RelZ);
174 FastSetBlock(a_RelPos.
x, a_RelPos.
y, a_RelPos.
z, a_BlockType, a_BlockMeta, a_SendToClients);
189 GetBlockInfo({ a_RelX, a_RelY, a_RelZ }, a_BlockType, a_Meta, a_SkyLight, a_BlockLight);
278 template <
class tyEntity,
BLOCKTYPE... tBlocktype>
305 template <
class tyEntity,
BLOCKTYPE... tBlocktype>
363 void PositionToWorldPosition(
int a_RelX,
int a_RelY,
int a_RelZ,
int & a_BlockX,
int & a_BlockY,
int & a_BlockZ);
387 void SetMeta(
int a_RelX,
int a_RelY,
int a_RelZ,
NIBBLETYPE a_Meta,
bool a_ShouldMarkDirty =
true,
bool a_ShouldInformClients =
true)
389 SetMeta({ a_RelX, a_RelY, a_RelZ }, a_Meta, a_ShouldMarkDirty, a_ShouldInformClients);
400 if (a_ShouldMarkDirty)
404 if (a_ShouldInformClients)
588 m_Tick(a_Tick), m_RelX(a_RelX), m_RelY(a_RelY), m_RelZ(a_RelZ), m_BlockType(a_BlockType), m_BlockMeta(a_BlockMeta), m_PreviousType(a_PreviousBlockType)
cWorld * GetWorld(void) const
sSetBlockVector m_PendingSendBlocks
Blocks that have changed and need to be sent to all clients.
bool GenericDoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFunctionRef< bool(tyEntity &)> a_Callback)
Calls the callback for the tyEntity at the specified coords; returns false if there's no such block e...
bool IsValid(void) const
Returns true iff the chunk block data is valid (loaded / generated)
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.
std::map< size_t, cBlockEntity * > cBlockEntities
void AddBlockEntity(cBlockEntity *a_BlockEntity)
NIBBLETYPE GetSkyLight(Vector3i a_RelPos) const
Get the level of sky light illuminating the block (0 - 15) independent of daytime.
void AddEntity(OwnedEntity a_Entity)
bool IsLightValid(void) const
bool ForEachDispenser(cDispenserCallback a_Callback)
Calls the callback for each dispenser; returns true if all dispensers processed, false if the callbac...
bool DoWithBedAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBedCallback a_Callback)
Calls the callback for the bed at the specified coords; returns false if there's no bed at those coor...
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_Chun...
bool DoWithDropperAt(int a_BlockX, int a_BlockY, int a_BlockZ, cDropperCallback a_Callback)
Calls the callback for the dispenser at the specified coords; returns false if there's no dropper at ...
cChunk * GetRelNeighborChunk(int a_RelX, int a_RelZ)
Returns the chunk into which the relatively-specified block belongs, by walking the neighbors...
cChunk * GetRelNeighborChunkAdjustCoords(Vector3i &a_RelPos) const
Returns the chunk into which the relatively-specified block belongs.
The chunk is not present, but is queued for loading / generation.
void SetAlwaysTicked(bool a_AlwaysTicked)
Increments (a_AlwaysTicked == true) or decrements (false) the m_AlwaysTicked counter.
sSetBlockQueueItem(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Int64 a_Tick, BLOCKTYPE a_PreviousBlockType)
NIBBLETYPE GetMeta(Vector3i a_RelPos) const
void GetRandomBlockCoords(int &a_X, int &a_Y, int &a_Z)
NIBBLETYPE GetTimeAlteredLight(NIBBLETYPE a_Skylight) const
Light alterations based on time.
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_Ch...
NIBBLETYPE GetBlockLight(Vector3i a_RelPos) const
Get the level of artificial light illuminating the block (0 - 15)
void MoveEntityToNewChunk(OwnedEntity a_Entity)
Called by Tick() when an entity moves out of this chunk into a neighbor; moves the entity and sends s...
cRedstoneSimulatorChunkData * m_RedstoneSimulatorData
void GetBlockTypes(BLOCKTYPE *a_BlockTypes)
Copies m_BlockData into a_BlockTypes, only the block types.
void MarkLoadFailed(void)
Marks the chunk as failed to load.
bool ForEachDropSpenser(cDropSpenserCallback a_Callback)
Calls the callback for each dropspenser; returns true if all dropspensers processed, false if the callback aborted by returning true.
bool GetSignLines(int a_BlockX, int a_BlockY, int a_BlockZ, AString &a_Line1, AString &a_Line2, AString &a_Line3, AString &a_Line4)
Retrieves the test on the sign at the specified coords; returns false if there's no sign at those coo...
void GetBlockTypeMeta(Vector3i a_RelPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
void CreateBlockEntities(void)
Creates a block entity for each block that needs a block entity and doesn't have one already...
unsigned char BLOCKTYPE
The datatype used by blockdata.
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)
NIBBLETYPE GetBlockLight(Vector3i a_RelPos) const
BLOCKTYPE GetBlock(Vector3i a_RelPos) const
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.
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.
bool DoWithCommandBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cCommandBlockCallback a_Callback)
Calls the callback for the command block at the specified coords; returns false if there's no command...
bool IsQueued(void) const
Returns true iff the chunk is in the queue for loading / generating.
bool HasBlockEntityAt(Vector3i a_BlockPos)
Returns true if there is a block entity at the coords specified.
bool UnboundedRelGetBlockType(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType) const
OBSOLETE, use the Vector3i-based overload.
void CalculateHeightmap(const BLOCKTYPE *a_BlockTypes)
bool UnboundedRelGetBlockBlockLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockLight) const
OBSOLETE, use the Vector3i-based overload.
Vector3i RelativeToAbsolute(Vector3i a_RelBlockPosition)
Converts the coord relative to this chunk into an absolute coord.
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...
bool UnboundedRelGetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
OBSOLETE, use the Vector3i-based overload.
bool DoWithBrewingstandAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBrewingstandCallback a_Callback)
Calls the callback for the brewingstand at the specified coords; returns false if there's no brewings...
int m_StayCount
Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero...
void GetThreeRandomNumbers(int &a_X, int &a_Y, int &a_Z, int a_MaxX, int a_MaxY, int a_MaxZ)
void AddBlockEntityClean(cBlockEntity *a_BlockEntity)
Add a block entity to the chunk without marking the chunk dirty.
cFluidSimulatorData * m_LavaSimulatorData
void SetBlock(Vector3i a_RelBlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
void CollectMobCensus(cMobCensus &toFill)
Recence all mobs proximities to players in order to know what to do with them.
void QueueTickBlock(Vector3i a_RelPos)
Queues block for ticking (m_ToTickQueue)
cBlockEntity * GetBlockEntityRel(Vector3i a_RelPos)
Returns the block entity at the specified (relative) coords.
void WakeUpSimulators(void)
Wakes up each simulator for its specific blocks; through all the blocks in the chunk.
cSandSimulatorChunkData m_SandSimulatorData
bool ForEachChest(cChestCallback a_Callback)
Calls the callback for each chest; returns true if all chests processed, false if the callback aborte...
void CollectPickupsByPlayer(cPlayer &a_Player)
Vector3i PositionToWorldPosition(Vector3i a_RelPos)
bool DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback a_Callback)
Calls the callback for the block entity at the specified coords; returns false if there's no block en...
cBlockEntities m_BlockEntities
bool DoWithFurnaceAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFurnaceCallback a_Callback)
Calls the callback for the furnace at the specified coords; returns false if there's no furnace at th...
OwnedEntity RemoveEntity(cEntity &a_Entity)
Releases ownership of the given entity if it was found in this chunk.
std::vector< OwnedEntity > m_Entities
bool CanUnloadAfterSaving(void)
Returns true if the chunk could have been unloaded if it weren't dirty.
cFluidSimulatorData * m_WaterSimulatorData
bool GetChunkAndRelByAbsolute(const Vector3d &a_Position, cChunk **a_Chunk, Vector3i &a_Rel)
Convert absolute coordinates into relative coordinates.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
cSandSimulatorChunkData & GetSandSimulatorData(void)
void SetMeta(Vector3i a_RelPos, NIBBLETYPE a_Meta, bool a_ShouldMarkDirty=true, bool a_ShouldInformClients=true)
Set a meta value, with the option of not informing the client and / or not marking dirty...
cFluidSimulatorData * GetLavaSimulatorData(void)
Constants used throughout the code, useful typedefs and utility functions.
Represents two sets of coords, minimum and maximum for each direction.
void Tick(std::chrono::milliseconds a_Dt)
bool DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBlockCallback a_Callback)
Calls the callback for the noteblock at the specified coords; returns false if there's no noteblock a...
void QueueTickBlockNeighbors(Vector3i a_RelPos)
Queues all 6 neighbors of the specified block for ticking (m_ToTickQueue).
bool HasEntity(UInt32 a_EntityID)
EMCSBiome
Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft.
bool DoWithEntityByID(UInt32 a_EntityID, cEntityCallback a_Callback, bool &a_CallbackResult)
Calls the callback if the entity with the specified ID is found, with the entity object as the callba...
bool m_ShouldGenerateIfLoadFailed
If the chunk fails to load, should it be queued in the generator or reset back to invalid...
bool SetSignLines(int a_RelX, int a_RelY, int a_RelZ, const AString &a_Line1, const AString &a_Line2, const AString &a_Line3, const AString &a_Line4)
Sets the sign text.
EMCSBiome GetBiomeAt(int a_RelX, int a_RelZ) const
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...
cBlockEntity * GetBlockEntity(Vector3i a_AbsPos)
Returns the block entity at the specified (absolute) coords.
bool ForEachEntityInBox(const cBoundingBox &a_Box, cEntityCallback a_Callback)
Calls the callback for each entity that has a nonempty intersection with the specified boundingbox...
void ApplyWeatherToTop(void)
Adds snow to the top of snowy biomes and hydrates farmland / fills cauldrons in rainy biomes...
NIBBLETYPE GetSkyLight(int a_RelX, int a_RelY, int a_RelZ) const
bool ForEachEntity(cEntityCallback a_Callback)
Calls the callback for each entity; returns true if all entities processed, false if the callback abo...
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 ...
NIBBLETYPE GetSkyLightAltered(Vector3i a_RelPos) const
Get the level of sky light illuminating the block (0 - 15), taking daytime into a account...
bool DoWithFlowerPotAt(int a_BlockX, int a_BlockY, int a_BlockZ, cFlowerPotCallback a_Callback)
Calls the callback for the flower pot at the specified coords; returns false if there's no flower pot...
void SetRedstoneSimulatorData(cRedstoneSimulatorChunkData *a_Data)
bool DoWithBeaconAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBeaconCallback a_Callback)
Calls the callback for the beacon at the specified coords; returns false if there's no beacon at thos...
ePresence m_Presence
Holds the presence status of the chunk - if it is present, or in the loader / generator queue...
bool UnboundedRelGetBlockMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockMeta) const
OBSOLETE, use the Vector3i-based overload.
cChunkDef::BiomeMap m_BiomeMap
This class is used to determine which monster can be spawned in which place it is essentially static ...
std::vector< cClientHandle * > m_LoadedByClient
NIBBLETYPE GetMeta(int a_RelX, int a_RelY, int a_RelZ) const
void CheckBlocks()
Checks the block scheduled for checking in m_ToTickBlocks[].
void SpawnMobs(cMobSpawner &a_MobSpawner)
Try to Spawn Monsters inside chunk.
std::list< cChunkPtr > cChunkPtrList
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 ...
cFireSimulatorChunkData m_FireSimulatorData
NIBBLETYPE GetSkyLight(Vector3i a_RelPos) const
cCoordWithIntList cSandSimulatorChunkData
Per-chunk data for the simulator, specified individual chunks to simulate; Data is not used...
cCoordWithIntList cFireSimulatorChunkData
Stores individual fire blocks in the chunk; the int data is used as the time [msec] the fire takes to...
int m_AlwaysTicked
If greater than zero, the chunk is ticked even if it has no clients.
std::list< cClientHandle * > cClientHandleList
bool UnboundedRelSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
OBSOLETE, use the Vector3i-based overload.
void BroadcastPendingBlockChanges(void)
Sends m_PendingSendBlocks to all clients.
bool GenericForEachBlockEntity(cFunctionRef< bool(tyEntity &)> a_Callback)
Calls the callback for each tyEntity; returns true if all block entities processed, false if the callback aborted by returning true tBlocktypes are all blocktypes convertible to tyEntity which are to be called.
std::vector< Vector3i > m_ToTickBlocks
void MarkRegenerating(void)
Marks all clients attached to this chunk as wanting this chunk.
static Vector3i RelativeToAbsolute(Vector3i a_RelBlockPosition, cChunkCoords a_ChunkCoords)
Converts relative block coordinates into absolute coordinates with a known chunk location.
void SetBiomeAt(int a_RelX, int a_RelZ, EMCSBiome a_Biome)
Sets the biome at the specified relative coords.
bool ForEachFurnace(cFurnaceCallback a_Callback)
Calls the callback for each furnace; returns true if all furnaces processed, false if the callback ab...
bool DoWithDropSpenserAt(int a_BlockX, int a_BlockY, int a_BlockZ, cDropSpenserCallback a_Callback)
Calls the callback for the dispenser at the specified coords; returns false if there's no dropspenser...
void TickBlocks(void)
Ticks several random blocks in the chunk.
This is a base class for all fluid simulator data classes.
void SetLight(const cChunkDef::BlockNibbles &a_BlockLight, const cChunkDef::BlockNibbles &a_SkyLight)
int GetHeight(int a_X, int a_Z)
std::vector< sSetBlockQueueItem > sSetBlockQueueVector
bool ForEachDropper(cDropperCallback a_Callback)
Calls the callback for each dropper; returns true if all droppers processed, false if the callback ab...
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...
bool DoWithMobHeadAt(int a_BlockX, int a_BlockY, int a_BlockZ, cMobHeadCallback a_Callback)
Calls the callback for the mob head block at the specified coords; returns false if there's no mob he...
bool DoWithChestAt(int a_BlockX, int a_BlockY, int a_BlockZ, cChestCallback a_Callback)
Calls the callback for the chest at the specified coords; returns false if there's no chest at those ...
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 ...
BLOCKTYPE GetBlock(int a_RelX, int a_RelY, int a_RelZ) const
cChunkDef::HeightMap m_HeightMap
bool SetMeta(Vector3i a_RelPos, NIBBLETYPE a_Nibble)
ePresence
Represents the presence state of the chunk.
bool UnboundedRelGetBlockLights(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_BlockLight, NIBBLETYPE &a_SkyLight) const
OBSOLETE, use the Vector3i-based overload.
cFluidSimulatorData * GetWaterSimulatorData(void)
bool HasClient(cClientHandle *a_Client)
Returns true if the specified client is present in this chunk.
bool UnboundedRelFastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
OBSOLETE, use the Vector3i-based overload.
void GetBlockInfo(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_Meta, NIBBLETYPE &a_SkyLight, NIBBLETYPE &a_BlockLight)
cChunk * GetNeighborChunk(int a_BlockX, int a_BlockZ)
Returns the chunk into which the specified block belongs, by walking the neighbors.
void UnboundedQueueTickBlock(Vector3i a_RelPos)
Same as QueueTickBlock(), but relative coords needn't be in this chunk (uses m_Neighbor-s in such a c...
This class is used to collect information, for each Mob, what is the distance of the closest player i...
bool DoWithDispenserAt(int a_BlockX, int a_BlockY, int a_BlockZ, cDispenserCallback a_Callback)
Calls the callback for the dispenser at the specified coords; returns false if there's no dispenser a...
int GrowPlantAt(Vector3i a_RelPos, int a_NumStages=1)
Grows the plant at the specified position by at most a_NumStages.
void SetPresence(ePresence a_Presence)
Sets the chunk's presence.
std::unique_ptr< cEntity > OwnedEntity
bool AddClient(cClientHandle *a_Client)
Adds a client to the chunk; returns true if added, false if already there.
The chunk is not present at all and is not queued in the loader / generator.
cBlockEntity * GetBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ)
OBSOLETE, use the Vector3i-based overload instead.
cChunk(int a_ChunkX, int a_ChunkZ, cChunkMap *a_ChunkMap, cWorld *a_World, cChunk *a_NeighborXM, cChunk *a_NeighborXP, cChunk *a_NeighborZM, cChunk *a_NeighborZP, cAllocationPool< cChunkData::sChunkSection > &a_Pool)
bool UseBlockEntity(cPlayer *a_Player, int a_X, int a_Y, int a_Z)
Use block entity on coordinate.
void GetBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
NIBBLETYPE BlockNibbles[NumBlocks/2]
The type used for block data in nibble format, AXIS_ORDER ordering.
void SetNextBlockTick(int a_RelX, int a_RelY, int a_RelZ)
Sets the blockticking to start at the specified block.
void GetBlockInfo(Vector3i a_RelPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_Meta, NIBBLETYPE &a_SkyLight, NIBBLETYPE &a_BlockLight)
void FastSetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients=true)
bool IsDirty(void) const
Returns true iff the chunk has changed since it was last saved.
void TickBlock(int a_RelX, int a_RelY, int a_RelZ)
Ticks a single block.
cChunkClientHandles GetAllClients(void) const
BLOCKTYPE GetBlock(Vector3i a_RelCoords) const
NIBBLETYPE GetSkyLightAltered(int a_RelX, int a_RelY, int a_RelZ) const
bool UnboundedRelGetBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE &a_SkyLight) const
OBSOLETE, use the Vector3i-based overload.
void SetShouldGenerateIfLoadFailed(bool a_ShouldGenerateIfLoadFailed)
Called to indicate whether the chunk should be queued in the generator if it fails to load...
cFireSimulatorChunkData & GetFireSimulatorData(void)
void RemoveBlockEntity(cBlockEntity *a_BlockEntity)
bool HasAnyClients(void) const
Returns true if theres any client in the chunk; false otherwise.
cItems PickupsFromBlock(Vector3i a_RelPos, const cEntity *a_Digger, const cItem *a_Tool)
Returns the pickups that would be produced, if the specified block was dug up by a_Digger using a_Too...
HEIGHTTYPE HeightMap[Width *Width]
The type used for any heightmap operations and storage; idx = x + Width * z; Height points to the hig...
void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta, bool a_ShouldMarkDirty=true, bool a_ShouldInformClients=true)
void GetAllData(cChunkDataCallback &a_Callback)
Gets all chunk data, calls the a_Callback's methods for each data type.
void FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients=true)
EMCSBiome BiomeMap[Width *Width]
The type used for any biomemap operations and storage inside Cuberite, using Cuberite biomes (need no...
bool ForEachBrewingstand(cBrewingstandCallback a_Callback)
Calls the callback for each brewingstand; returns true if all brewingstands processed, false if the callback aborted by returning true.
void QueueTickBlock(int a_RelX, int a_RelY, int a_RelZ)
OBSOLETE, use the Vector3i-based overload instead.
bool ShouldBeTicked(void) const
Returns true if the chunk should be ticked in the tick-thread.
std::vector< sSetBlock > sSetBlockVector
This class bridges a vector of cItem for safe access via Lua.
cRedstoneSimulatorChunkData * GetRedstoneSimulatorData(void)
void Stay(bool a_Stay=true)
Sets or resets the internal flag that prevents chunk from being unloaded.
NIBBLETYPE GetMeta(Vector3i a_RelPos) const
static EMCSBiome GetBiome(const BiomeMap &a_BiomeMap, int a_X, int a_Z)
void SetAllData(cSetChunkData &a_SetChunkData)
Sets all chunk data as either loaded from the storage or generated.
NIBBLETYPE GetBlockLight(int a_RelX, int a_RelY, int a_RelZ) const
Non-owning view of a chunk's client handles.
void RemoveClient(cClientHandle *a_Client)
Removes the specified client from the chunk; ignored if client not in chunk.