From afdbb1d71bb69cf20cd7458e192be0c9308515ba Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 6 Feb 2013 22:29:29 +0000 Subject: cBlockArea can now be loaded from a .schematic file. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1195 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockArea.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/BlockArea.h') diff --git a/source/BlockArea.h b/source/BlockArea.h index 797c37de6..58f5cf061 100644 --- a/source/BlockArea.h +++ b/source/BlockArea.h @@ -16,9 +16,12 @@ -// fwd: "cWorld.h" +// fwd: World.h class cWorld; +// fwd: FastNBT.h +class cParsedNBT; + @@ -59,6 +62,9 @@ public: // TODO: Write() is not too good an interface: if it fails, there's no way to repeat only for the parts that didn't write // A better way may be to return a list of cBlockAreas for each part that didn't succeed writing, so that the caller may try again + /// Loads an area from a .schematic file. Returns true if successful + bool LoadFromSchematicFile(const AString & a_FileName); + /// Crops the internal contents by the specified amount of blocks from each border. void Crop(int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ); @@ -166,6 +172,9 @@ protected: // Crop helpers: void CropBlockTypes(int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ); void CropNibbles (NIBBLEARRAY & a_Array, int a_AddMinX, int a_SubMaxX, int a_AddMinY, int a_SubMaxY, int a_AddMinZ, int a_SubMaxZ); + + /// Loads the area from a schematic file uncompressed and parsed into a NBT tree. Returns true if successful. + bool LoadFromSchematicNBT(cParsedNBT & a_NBT); // tolua_begin } ; -- cgit v1.2.3