summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-19 22:19:36 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-19 22:19:36 +0100
commit05d71675f69e13d8ab590a33b38ee6d0f8a77b6f (patch)
tree97453620e42516f0e6da1e969397e14becdc15b4 /source/Chunk.cpp
parentImplemented double doors (diff)
downloadcuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.gz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.bz2
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.lz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.xz
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.zst
cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.zip
Diffstat (limited to '')
-rw-r--r--source/Chunk.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index 5bfe28e41..5dc19915a 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -13,6 +13,7 @@
#include "zlib.h"
#include "Defines.h"
#include "ChestEntity.h"
+#include "DispenserEntity.h"
#include "FurnaceEntity.h"
#include "SignEntity.h"
#include "NoteEntity.h"
@@ -982,6 +983,15 @@ void cChunk::CreateBlockEntities(void)
}
break;
}
+
+ case E_BLOCK_DISPENSER:
+ {
+ if (!HasBlockEntityAt(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width))
+ {
+ m_BlockEntities.push_back( new cDispenserEntity( x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width, m_World) );
+ }
+ break;
+ }
case E_BLOCK_FURNACE:
{
@@ -1128,6 +1138,11 @@ void cChunk::SetBlock( int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType
AddBlockEntity( new cChestEntity( WorldPos.x, WorldPos.y, WorldPos.z, m_World) );
break;
}
+ case E_BLOCK_DISPENSER:
+ {
+ AddBlockEntity( new cDispenserEntity( WorldPos.x, WorldPos.y, WorldPos.z, m_World) );
+ break;
+ }
case E_BLOCK_FURNACE:
{
AddBlockEntity( new cFurnaceEntity( WorldPos.x, WorldPos.y, WorldPos.z, m_World) );