From b55afc940b4a95ac0191cc24a40c5c3824ab2f0f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 8 Feb 2013 20:57:42 +0000 Subject: cChunkDesc can now read and write cBlockAreas. A simple example is provided in the Debuggers plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1201 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockArea.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/BlockArea.h') diff --git a/source/BlockArea.h b/source/BlockArea.h index ace596be6..e01eade69 100644 --- a/source/BlockArea.h +++ b/source/BlockArea.h @@ -96,7 +96,9 @@ public: NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; - + + void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); + void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); void GetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) const; void GetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) const; @@ -128,6 +130,7 @@ public: int MakeIndex(int a_RelX, int a_RelY, int a_RelZ) const; protected: + friend class cChunkDesc; class cChunkReader : public cChunkDataCallback @@ -168,6 +171,7 @@ protected: NIBBLETYPE * m_BlockLight; // Each light value is stored as a separate byte for faster access NIBBLETYPE * m_BlockSkyLight; // Each light value is stored as a separate byte for faster access + /// Clears the data stored and prepares a fresh new block area with the specified dimensions bool SetSize(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes); // Basic Setters: -- cgit v1.2.3