summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/ChestEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-13 00:24:32 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-13 00:24:32 +0200
commit5f72cdac3880f22590b30217aeab6022dc64cc69 (patch)
treef79245b62979addf8a02ee561d20a390f82631c4 /src/BlockEntities/ChestEntity.cpp
parentComment grammar correction (diff)
parentcNBTChunkSerializer: Fixed alignment. (diff)
downloadcuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar.gz
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar.bz2
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar.lz
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar.xz
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.tar.zst
cuberite-5f72cdac3880f22590b30217aeab6022dc64cc69.zip
Diffstat (limited to 'src/BlockEntities/ChestEntity.cpp')
-rw-r--r--src/BlockEntities/ChestEntity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index cb9cc89bf..ca164464c 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -11,8 +11,9 @@
-cChestEntity::cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) :
- super(E_BLOCK_CHEST, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World)
+cChestEntity::cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World, BLOCKTYPE a_Type) :
+ super(a_Type, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World),
+ m_NumActivePlayers(0)
{
cBlockEntityWindowOwner::SetBlockEntity(this);
}
@@ -113,7 +114,7 @@ void cChestEntity::UsedBy(cPlayer * a_Player)
// The few false positives aren't much to worry about
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(m_PosX, m_PosZ, ChunkX, ChunkZ);
- m_World->MarkChunkDirty(ChunkX, ChunkZ);
+ m_World->MarkChunkDirty(ChunkX, ChunkZ, true);
}