a78fd671b2
* Removed BiomeDef.h * Removed ChunkDef.h from Globals.h * Added to CONTRIBUTORS. * Re-added empty last line to Globals.h * Included stddef and StringUtils in BiomeDef.h * Fixed build tools compiling. It compiles, but at what cost? * Added include to src/Generating/Trees.h * Include added in ChunkGeneratorThread.h * Moved rearranged includes in LineBlockTracer.cpp * Re-arrange headers in ChunkInterface.cpp * Included ChunkDef.h in Path.h * Included ChunkDef.h in NBTChunkSerializer.h * Rearranged included and added required includes to headers. * Removed unnecessary included in StringUtils.h.
28 lines
673 B
C++
28 lines
673 B
C++
// NBTChunkSerializer.h
|
|
|
|
#pragma once
|
|
|
|
#include "ChunkDef.h"
|
|
|
|
|
|
|
|
// fwd:
|
|
class cFastNBTWriter;
|
|
class cWorld;
|
|
|
|
|
|
|
|
|
|
|
|
/** Saves the chunk data into a NBT format, used by the Anvil storage.
|
|
The Writer is expected to be set up so that the serializer can write the chunk's top level "Level" NBT tag immediately.
|
|
Provides a single static entry point that does all the work, through a hidden worker class in the CPP file. */
|
|
class NBTChunkSerializer
|
|
{
|
|
public:
|
|
|
|
/** Serializes the chunk into the specified writer.
|
|
Returns true on success, false on failure (chunk not present etc.) */
|
|
static bool serialize(const cWorld & aWorld, cChunkCoords aCoords, cFastNBTWriter & aWriter);
|
|
};
|