summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-13 23:02:10 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-13 23:02:10 +0200
commita49c004278b0e300521e9cedf44a46ac843a958b (patch)
treecc268ccbd5b938be93923d9aced847572364e263 /source/WorldStorage/WSSAnvil.cpp
parentFixed a bit of coding style and function names in cItem (diff)
downloadcuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.gz
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.bz2
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.lz
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.xz
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.zst
cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.zip
Diffstat (limited to '')
-rw-r--r--source/WorldStorage/WSSAnvil.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp
index f14d4918b..234ddbd20 100644
--- a/source/WorldStorage/WSSAnvil.cpp
+++ b/source/WorldStorage/WSSAnvil.cpp
@@ -113,10 +113,12 @@ bool cWSSAnvil::SaveChunk(const cChunkCoords & a_Chunk)
AString ChunkData;
if (!SaveChunkToData(a_Chunk, ChunkData))
{
+ LOGWARNING("Cannot serialize chunk [%d, %d] into data", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
if (!SetChunkData(a_Chunk, ChunkData))
{
+ LOGWARNING("Cannot store chunk [%d, %d] data", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
@@ -252,6 +254,7 @@ bool cWSSAnvil::SaveChunkToData(const cChunkCoords & a_Chunk, AString & a_Data)
cFastNBTWriter Writer;
if (!SaveChunkToNBT(a_Chunk, Writer))
{
+ LOGWARNING("Cannot save chunk [%d, %d] to NBT", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
Writer.Finish();
@@ -360,7 +363,7 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT
//*/
m_World->SetChunkData(
- a_Chunk.m_ChunkX, a_Chunk.m_ChunkY, a_Chunk.m_ChunkZ,
+ a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ,
BlockTypes, MetaData,
IsLightValid ? BlockLight : NULL,
IsLightValid ? SkyLight : NULL,
@@ -393,8 +396,9 @@ bool cWSSAnvil::SaveChunkToNBT(const cChunkCoords & a_Chunk, cFastNBTWriter & a_
a_Writer.AddInt("xPos", a_Chunk.m_ChunkX);
a_Writer.AddInt("zPos", a_Chunk.m_ChunkZ);
cNBTChunkSerializer Serializer(a_Writer);
- if (!m_World->GetChunkData(a_Chunk.m_ChunkX, a_Chunk.m_ChunkY, a_Chunk.m_ChunkZ, Serializer))
+ if (!m_World->GetChunkData(a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ, Serializer))
{
+ LOGWARNING("Cannot get chunk [%d, %d] data for NBT saving", a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;
}
Serializer.Finish(); // Close NBT tags