summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/ChestEntity.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-29 14:59:24 +0200
committerGitHub <noreply@github.com>2019-09-29 14:59:24 +0200
commit365cbc6e1cea96741e26c9ce912b003f8fd2c62c (patch)
treef23682c47928597791c53f3a300b03494ffde417 /src/BlockEntities/ChestEntity.h
parentCactus can now grow and will be dropped if there is no place to grow. (diff)
downloadcuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.gz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.bz2
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.lz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.xz
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.tar.zst
cuberite-365cbc6e1cea96741e26c9ce912b003f8fd2c62c.zip
Diffstat (limited to 'src/BlockEntities/ChestEntity.h')
-rw-r--r--src/BlockEntities/ChestEntity.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index de4c1cce6..2e861d48c 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -18,9 +18,14 @@ class cClientHandle;
class cChestEntity :
public cBlockEntityWithItems
{
- typedef cBlockEntityWithItems Super;
+ // tolua_end
+
+ using super = cBlockEntityWithItems;
+
+ // tolua_begin
public:
+
enum
{
ContentsHeight = 3,
@@ -32,7 +37,7 @@ public:
BLOCKENTITY_PROTODEF(cChestEntity)
/** Constructor used for normal operation */
- cChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
+ cChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
virtual ~cChestEntity() override;
@@ -59,6 +64,7 @@ public:
/** Sets the number of players who currently have this chest open */
void SetNumberOfPlayers(int a_NumActivePlayers) { m_NumActivePlayers = a_NumActivePlayers; }
+
private:
/** Number of players who currently have this chest open */
@@ -90,10 +96,9 @@ private:
}
m_World->MarkChunkDirty(GetChunkX(), GetChunkZ());
- auto Pos = Vector3i(m_PosX, m_PosY, m_PosZ);
- m_World->DoWithChunkAt(Pos, [&](cChunk & a_Chunk)
+ m_World->DoWithChunkAt(m_Pos, [&](cChunk & a_Chunk)
{
- m_World->GetRedstoneSimulator()->WakeUp(Pos, &a_Chunk);
+ m_World->GetRedstoneSimulator()->WakeUp(m_Pos, &a_Chunk);
return true;
}
);