summaryrefslogtreecommitdiffstats
path: root/source/WSSAnvil.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-10 22:42:18 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-10 22:42:18 +0100
commit4004129e112779e853813432434f2a04e8973776 (patch)
treee0fc15595c56dc310ad52c308e97ea628e88e03f /source/WSSAnvil.cpp
parentUsing references instead of pointers for sending packets (diff)
downloadcuberite-4004129e112779e853813432434f2a04e8973776.tar
cuberite-4004129e112779e853813432434f2a04e8973776.tar.gz
cuberite-4004129e112779e853813432434f2a04e8973776.tar.bz2
cuberite-4004129e112779e853813432434f2a04e8973776.tar.lz
cuberite-4004129e112779e853813432434f2a04e8973776.tar.xz
cuberite-4004129e112779e853813432434f2a04e8973776.tar.zst
cuberite-4004129e112779e853813432434f2a04e8973776.zip
Diffstat (limited to '')
-rw-r--r--source/WSSAnvil.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/WSSAnvil.cpp b/source/WSSAnvil.cpp
index ce9afc652..d3b4a51fe 100644
--- a/source/WSSAnvil.cpp
+++ b/source/WSSAnvil.cpp
@@ -225,6 +225,7 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, cNBTTag & a_NBT)
LoadEntitiesFromNBT (Entities, (cNBTList *)(a_NBT.FindChildByPath("Level\\Entities")));
LoadBlockEntitiesFromNBT(BlockEntities, (cNBTList *)(a_NBT.FindChildByPath("Level\\TileEntities")));
+ #if (AXIS_ORDER == AXIS_ORDER_YZX)
// Reorder the chunk data - walk the MCA-formatted data sequentially and copy it into the right place in the ChunkData:
char ChunkData[cChunk::c_BlockDataSize];
memset(ChunkData, 0, sizeof(ChunkData));
@@ -255,6 +256,9 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, cNBTTag & a_NBT)
cChunk::SetNibble(ChunkSkyLight, x, y, z, SkyLight[Index / 2] >> ((Index % 2) * 4));
Index++;
} // for y/z/x
+ #else // AXIS_ORDER_YZX
+ char * ChunkData = BlockData;
+ #endif // else AXIS_ORDER_YZX
m_World->ChunkDataLoaded(a_Chunk.m_ChunkX, a_Chunk.m_ChunkY, a_Chunk.m_ChunkZ, ChunkData, Entities, BlockEntities);
return true;