summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-06 23:21:57 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-06 23:21:57 +0200
commit502935c061ea913180f0a77a7406f5292e697c79 (patch)
treea74e562a772b89db12985d6f1744ae91ff4890d6 /source/Chunk.cpp
parentAdded a tab in the serversettings where you can edit the world.ini of all your worlds. (diff)
downloadcuberite-502935c061ea913180f0a77a7406f5292e697c79.tar
cuberite-502935c061ea913180f0a77a7406f5292e697c79.tar.gz
cuberite-502935c061ea913180f0a77a7406f5292e697c79.tar.bz2
cuberite-502935c061ea913180f0a77a7406f5292e697c79.tar.lz
cuberite-502935c061ea913180f0a77a7406f5292e697c79.tar.xz
cuberite-502935c061ea913180f0a77a7406f5292e697c79.tar.zst
cuberite-502935c061ea913180f0a77a7406f5292e697c79.zip
Diffstat (limited to '')
-rw-r--r--source/Chunk.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index 9856e67b3..0a7b39f12 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -306,6 +306,12 @@ void cChunk::SetAllData(
}
std::swap(a_BlockEntities, m_BlockEntities);
+ // Set all block entities' World variable:
+ for (cBlockEntityList::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
+ {
+ (*itr)->SetWorld(m_World);
+ }
+
// Create block entities that the loader didn't load; fill them with defaults
CreateBlockEntities();
@@ -1015,8 +1021,8 @@ void cChunk::CreateBlockEntities(void)
{
for (int y = 0; y < Height; y++)
{
- ENUM_BLOCK_ID BlockType = (ENUM_BLOCK_ID)cChunkDef::GetBlock(m_BlockTypes, x, y, z);
- switch ( BlockType )
+ BLOCKTYPE BlockType = cChunkDef::GetBlock(m_BlockTypes, x, y, z);
+ switch (BlockType)
{
case E_BLOCK_CHEST:
{