summaryrefslogtreecommitdiffstats
path: root/Tools/BlockZapper/Zapper.cpp
diff options
context:
space:
mode:
authorAlexander Lyons Harkness <me@bearbin.net>2017-12-23 13:49:08 +0100
committerAlexander Lyons Harkness <me@bearbin.net>2017-12-24 15:23:23 +0100
commit1926181cb7c8570fe57ec1b39d4241b9dd156333 (patch)
tree8ac9c6f24285846fa3f97f0a4ade9b0f9996f295 /Tools/BlockZapper/Zapper.cpp
parentFixed item ID raw rabbit (#4103) (diff)
downloadcuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.gz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.bz2
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.lz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.xz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.zst
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.zip
Diffstat (limited to 'Tools/BlockZapper/Zapper.cpp')
-rw-r--r--Tools/BlockZapper/Zapper.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/Tools/BlockZapper/Zapper.cpp b/Tools/BlockZapper/Zapper.cpp
index 304d49770..83c9657ce 100644
--- a/Tools/BlockZapper/Zapper.cpp
+++ b/Tools/BlockZapper/Zapper.cpp
@@ -15,7 +15,7 @@
-/// The maximum size of an inflated chunk; raw chunk data is 192 KiB, allow 64 KiB more of entities
+/** The maximum size of an inflated chunk; raw chunk data is 192 KiB, allow 64 KiB more of entities */
#define CHUNK_INFLATE_MAX 256 KiB
@@ -115,7 +115,7 @@ void cZapper::ZapRegionInMCAFile(const cRegion & a_Region, int a_MCAX, int a_MCA
int ChunkZ = a_MCAZ * ChunksPerMCAZ + (i / ChunksPerMCAX);
LoadChunkData(fIn, HeaderIn[i], ChunkData, ChunkX, ChunkZ);
-
+
if (a_Region.TouchesChunk(ChunkX, ChunkZ))
{
ZapRegionInRawChunkData(a_Region, ChunkData, ChunkX, ChunkZ);
@@ -218,14 +218,14 @@ void cZapper::ZapRegionInRawChunkData(const cRegion & a_Region, AString & a_Chun
return;
}
ZapRegionInNBTChunk(a_Region, NBT, a_ChunkX, a_ChunkZ);
-
+
cFastNBTWriter Writer;
for (int ch = NBT.GetFirstChild(0); ch >= 0; ch = NBT.GetNextSibling(ch))
{
SerializeNBTTag(NBT, ch, Writer);
}
Writer.Finish();
-
+
/*
// DEBUG: Output dst to a file:
cFile f2;
@@ -251,7 +251,7 @@ void cZapper::ZapRegionInNBTChunk(const cRegion & a_Region, cParsedNBT & a_NBT,
fprintf(stderr, "Cannot find Level tag in chunk [%d, %d]'s NBT. Skipping chunk.", a_ChunkX, a_ChunkZ);
return;
}
-
+
// Create a copy of the region and limit it to the current chunk:
int BlockX = a_ChunkX * 16;
int BlockZ = a_ChunkZ * 16;
@@ -273,7 +273,7 @@ void cZapper::ZapRegionInNBTChunk(const cRegion & a_Region, cParsedNBT & a_NBT,
}
ZapRegionBlocksInNBT(Local, a_NBT, SectionsTag);
}
-
+
if (a_Region.m_ShouldZapEntities)
{
int EntitiesTag = a_NBT.FindChildByName(LevelTag, "Entities");
@@ -320,7 +320,7 @@ void cZapper::ZapRegionBlocksInNBT(const cRegion & a_Region, cParsedNBT & a_NBT,
{
ZapRegionInNBTSectionNibbles(a_Region, y, (unsigned char *)(a_NBT.GetData(BlockAddTag)));
}
- } // for Child - Level/Sections/[]
+ } // for Child - Level / Sections / []
}
@@ -426,7 +426,7 @@ void cZapper::SerializeNBTTag(const cParsedNBT & a_NBT, int a_Tag, cFastNBTWrite
a_Writer.EndCompound();
break;
}
-
+
default:
{
ASSERT(!"Unknown NBT tag");
@@ -434,7 +434,3 @@ void cZapper::SerializeNBTTag(const cParsedNBT & a_NBT, int a_Tag, cFastNBTWrite
}
}
}
-
-
-
-