summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-30 17:16:15 +0200
committerMattes D <github@xoft.cz>2014-09-30 17:16:15 +0200
commit1531511bbe6affcb26e6ade17e4a313f5209e8e7 (patch)
treee9aa42ac32fcb72bf306e679be80cf0082694fc8 /src/BlockEntities
parentMerge pull request #1484 from SphinxC0re/master (diff)
parentCompilation fix (diff)
downloadcuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.gz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.bz2
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.lz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.xz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.zst
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.zip
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/BlockEntityWithItems.h10
-rw-r--r--src/BlockEntities/ChestEntity.cpp1
-rw-r--r--src/BlockEntities/DispenserEntity.cpp1
-rw-r--r--src/BlockEntities/DropSpenserEntity.cpp1
-rw-r--r--src/BlockEntities/DropperEntity.cpp1
-rw-r--r--src/BlockEntities/EnderChestEntity.cpp3
-rw-r--r--src/BlockEntities/FurnaceEntity.cpp1
7 files changed, 6 insertions, 12 deletions
diff --git a/src/BlockEntities/BlockEntityWithItems.h b/src/BlockEntities/BlockEntityWithItems.h
index e511ee8cb..00173cbcb 100644
--- a/src/BlockEntities/BlockEntityWithItems.h
+++ b/src/BlockEntities/BlockEntityWithItems.h
@@ -20,12 +20,9 @@
// tolua_begin
class cBlockEntityWithItems :
- public cBlockEntity
- // tolua_end
- // tolua doesn't seem to support multiple inheritance?
- , public cItemGrid::cListener
- , public cBlockEntityWindowOwner
- // tolua_begin
+ public cBlockEntity,
+ public cItemGrid::cListener,
+ public cBlockEntityWindowOwner
{
typedef cBlockEntity super;
@@ -39,6 +36,7 @@ public:
cWorld * a_World // Optional world to assign to the entity
) :
super(a_BlockType, a_BlockX, a_BlockY, a_BlockZ, a_World),
+ cBlockEntityWindowOwner(this),
m_Contents(a_ItemGridWidth, a_ItemGridHeight)
{
m_Contents.AddListener(*this);
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index 5447c7c49..a89e5747e 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -14,7 +14,6 @@ cChestEntity::cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_
super(a_Type, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World),
m_NumActivePlayers(0)
{
- cBlockEntityWindowOwner::SetBlockEntity(this);
}
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp
index 4794375cf..aea854dc2 100644
--- a/src/BlockEntities/DispenserEntity.cpp
+++ b/src/BlockEntities/DispenserEntity.cpp
@@ -14,7 +14,6 @@
cDispenserEntity::cDispenserEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) :
super(E_BLOCK_DISPENSER, a_BlockX, a_BlockY, a_BlockZ, a_World)
{
- SetBlockEntity(this); // cBlockEntityWindowOwner
}
diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp
index 260c71641..05c7403e7 100644
--- a/src/BlockEntities/DropSpenserEntity.cpp
+++ b/src/BlockEntities/DropSpenserEntity.cpp
@@ -18,7 +18,6 @@ cDropSpenserEntity::cDropSpenserEntity(BLOCKTYPE a_BlockType, int a_BlockX, int
m_ShouldDropSpense(false),
m_IsPowered(false)
{
- SetBlockEntity(this); // cBlockEntityWindowOwner
}
diff --git a/src/BlockEntities/DropperEntity.cpp b/src/BlockEntities/DropperEntity.cpp
index 5cbf6d56e..38d1aa988 100644
--- a/src/BlockEntities/DropperEntity.cpp
+++ b/src/BlockEntities/DropperEntity.cpp
@@ -13,7 +13,6 @@
cDropperEntity::cDropperEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) :
super(E_BLOCK_DROPPER, a_BlockX, a_BlockY, a_BlockZ, a_World)
{
- SetBlockEntity(this); // cBlockEntityWindowOwner
}
diff --git a/src/BlockEntities/EnderChestEntity.cpp b/src/BlockEntities/EnderChestEntity.cpp
index b870f9e50..0654d97dd 100644
--- a/src/BlockEntities/EnderChestEntity.cpp
+++ b/src/BlockEntities/EnderChestEntity.cpp
@@ -11,7 +11,8 @@
cEnderChestEntity::cEnderChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) :
- super(E_BLOCK_ENDER_CHEST, a_BlockX, a_BlockY, a_BlockZ, a_World)
+ super(E_BLOCK_ENDER_CHEST, a_BlockX, a_BlockY, a_BlockZ, a_World),
+ cBlockEntityWindowOwner(this)
{
}
diff --git a/src/BlockEntities/FurnaceEntity.cpp b/src/BlockEntities/FurnaceEntity.cpp
index d7b2fd910..fb88e9b35 100644
--- a/src/BlockEntities/FurnaceEntity.cpp
+++ b/src/BlockEntities/FurnaceEntity.cpp
@@ -34,7 +34,6 @@ cFurnaceEntity::cFurnaceEntity(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTY
m_LastProgressFuel(0),
m_LastProgressCook(0)
{
- cBlockEntityWindowOwner::SetBlockEntity(this);
m_Contents.AddListener(*this);
}