5 #include "../Simulator/RedstoneSimulator.h"
15 int a_ItemGridWidth,
int a_ItemGridHeight,
18 Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
20 m_Contents(a_ItemGridWidth, a_ItemGridHeight)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
Vector3i m_Pos
Position in absolute block coordinates.
virtual void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
virtual cItems ConvertToPickups() const override
Returns the contents of this block entity that it would drop if broken.
cBlockEntityWithItems(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, int a_ItemGridWidth, int a_ItemGridHeight, cWorld *a_World)
virtual void OnSlotChanged(cItemGrid *a_Grid, int a_SlotNum) override
Called whenever a slot changes.
This class bridges a vector of cItem for safe access via Lua.
void AddItemGrid(const cItemGrid &a_ItemGrid)
Adds a copy of all items in a_ItemGrid.
void CopyFrom(const cItemGrid &a_Src)
Copies all items from a_Src to this grid.
void AddListener(cListener &a_Listener)
Adds a callback that gets called whenever a slot changes.
void BroadcastWholeWindow(void)
Sends the contents of the whole window to all clients of this window.
cWindow * GetWindow(void) const
Window owner that is associated with a block entity (chest, furnace, ...)
void MarkChunkDirty(int a_ChunkX, int a_ChunkZ)
virtual void WakeUpSimulators(Vector3i a_Block) override
Wakes up the simulators for the specified block.