summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-26 19:50:42 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-26 19:50:42 +0200
commit6ad8553a3a9095bd5a8c25085fa0bb209d411048 (patch)
treec6ba74fd34eb0f599e2037ac120bfae30314f0dd /source/cChunk.cpp
parentRemoved old makefile; use GNUmakefile instead (diff)
downloadcuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar.gz
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar.bz2
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar.lz
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar.xz
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.tar.zst
cuberite-6ad8553a3a9095bd5a8c25085fa0bb209d411048.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 8fb4570ae..c479a7bc3 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -17,6 +17,7 @@
#include "cChestEntity.h"
#include "cFurnaceEntity.h"
#include "cSignEntity.h"
+#include "cNoteEntity.h"
#include "cTorch.h"
#include "cLadder.h"
#include "cPickup.h"
@@ -962,6 +963,15 @@ void cChunk::CreateBlockEntities(void)
}
break;
}
+
+ case E_BLOCK_NOTE_BLOCK:
+ {
+ if (!HasBlockEntityAt(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width))
+ {
+ m_BlockEntities.push_back(new cNoteEntity(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width, m_World) );
+ }
+ break;
+ }
} // switch (BlockType)
} // for y
} // for z
@@ -1087,6 +1097,11 @@ void cChunk::SetBlock( int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType
AddBlockEntity( new cSignEntity( (ENUM_BLOCK_ID)a_BlockType, WorldPos.x, WorldPos.y, WorldPos.z, m_World) );
break;
}
+ case E_BLOCK_NOTE_BLOCK:
+ {
+ AddBlockEntity(new cNoteEntity(WorldPos.x, WorldPos.y, WorldPos.z, m_World));
+ break;
+ }
} // switch (a_BlockType)
}