21 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
22 int a_CursorX,
int a_CursorY,
int a_CursorZ,
69 switch (a_Chunk.
GetMeta(a_RelX, a_RelY, a_RelZ))
73 static const std::array<Vector3i, 4> PortalCheck
83 for (
const auto &
Direction : PortalCheck)
97 static const std::array<Vector3i, 4> PortalCheck
107 for (
const auto &
Direction : PortalCheck)
unsigned char BLOCKTYPE
The datatype used by blockdata.
MTRand & GetRandomProvider()
Returns the current thread's random number source.
virtual UInt32 SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType, bool a_Baby)=0
Spawns a mob of the specified type.
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...
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
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
virtual bool CanBeAt(cChunkInterface &a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk &a_Chunk) override
Checks if the block can stay at the specified relative coords in the chunk.
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.
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
cBlockPortalHandler(BLOCKTYPE a_BlockType)
virtual bool GetPlacementBlockTypeMeta(cChunkInterface &a_ChunkInterface, cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) override
Called before a block is placed into a world.
This class bridges a vector of cItem for safe access via Lua.