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