13 #include "../BlockArea.h" 119 if (!Area.
Read(*a_Chunk.
GetWorld(), BlockX - 4, BlockX + 4, a_RelY, a_RelY + 1, BlockZ - 4, BlockZ + 4))
127 for (
size_t i = 0; i < NumBlocks; i++)
cWorld * GetWorld(void) const
void SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Sets the block at the specified coords to the specified value.
bool IsBlockWater(BLOCKTYPE a_BlockType)
virtual bool CanSustainPlant(BLOCKTYPE a_Plant) override
Checks whether the block has an effect on growing the plant.
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool IsWaterInNear(cChunk &a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
virtual void OnUpdate(cChunkInterface &cChunkInterface, cWorldInterface &a_WorldInterface, cBlockPluginInterface &a_PluginInterface, cChunk &a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
Called when the block gets ticked either by a random tick or by a queued tick.
void SetBlock(Vector3i a_RelBlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld...
NIBBLETYPE GetMeta(int a_RelX, int a_RelY, int a_RelZ) const
cBlockFarmlandHandler(BLOCKTYPE a_BlockType)
virtual bool IsWeatherWetAt(int a_BlockX, int a_BlockZ) override
Returns true if it is raining or storming at the specified location.
size_t GetBlockCount(void) const
static bool FullyOccupiesVoxel(BLOCKTYPE a_Type)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
BLOCKTYPE GetBlock(Vector3i a_Pos)
BLOCKTYPE GetBlock(int a_RelX, int a_RelY, int a_RelZ) const
bool Read(cForEachChunkProvider &a_ForEachChunkProvider, int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ, int a_DataTypes=baTypes|baMetas|baBlockEntities)
Reads an area of blocks specified.
virtual void OnNeighborChanged(cChunkInterface &a_ChunkInterface, Vector3i a_BlockPos, eBlockFace a_WhichNeighbor) override
Called when a direct neighbor of this block has been changed.
BLOCKTYPE * GetBlockTypes(void) const
Returns the internal pointer to the block types.
Mixin to clear the block's meta value when converting to a pickup.
void FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients=true)