summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)
}