diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2016-02-06 11:37:34 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2016-02-06 11:37:34 +0100 |
commit | 6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch) | |
tree | 7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/BlockEntities/BlockEntityWithItems.h | |
parent | Merge pull request #2958 from LogicParrot/fence (diff) | |
parent | Bulk clearing of whitespace (diff) | |
download | cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2 cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/BlockEntityWithItems.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/BlockEntities/BlockEntityWithItems.h b/src/BlockEntities/BlockEntityWithItems.h index 3810f4f04..39540d630 100644 --- a/src/BlockEntities/BlockEntityWithItems.h +++ b/src/BlockEntities/BlockEntityWithItems.h @@ -30,9 +30,9 @@ class cBlockEntityWithItems : public: // tolua_end - + BLOCKENTITY_PROTODEF(cBlockEntityWithItems) - + cBlockEntityWithItems( BLOCKTYPE a_BlockType, // Type of the block that the entity represents int a_BlockX, int a_BlockY, int a_BlockZ, // Position of the block entity @@ -45,7 +45,7 @@ public: { m_Contents.AddListener(*this); } - + virtual void Destroy(void) override { // Drop the contents as pickups: @@ -55,12 +55,12 @@ public: m_Contents.Clear(); m_World->SpawnItemPickups(Pickups, m_PosX + 0.5, m_PosY + 0.5, m_PosZ + 0.5); // Spawn in centre of block } - + // tolua_begin - + const cItem & GetSlot(int a_SlotNum) const { return m_Contents.GetSlot(a_SlotNum); } const cItem & GetSlot(int a_X, int a_Y) const { return m_Contents.GetSlot(a_X, a_Y); } - + void SetSlot(int a_SlotNum, const cItem & a_Item) { m_Contents.SetSlot(a_SlotNum, a_Item); } void SetSlot(int a_X, int a_Y, const cItem & a_Item) { m_Contents.SetSlot(a_X, a_Y, a_Item); } @@ -68,13 +68,13 @@ public: cItemGrid & GetContents(void) { return m_Contents; } // tolua_end - + /** Const version of the GetContents() function for C++ type-safety */ const cItemGrid & GetContents(void) const { return m_Contents; } protected: cItemGrid m_Contents; - + // cItemGrid::cListener overrides: virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) override { |