From 2df14a04962037b93352c2fc53349af54ab3b14d Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sun, 4 Feb 2018 22:15:31 +0000 Subject: cChunk and cChunkData: Use vectors for block get and set functions (#4172) * cChunkData: Change interface to use Vector3i * cChunk: Add Vector3i overloads for bounded block get and set functions. --- src/ChunkData.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ChunkData.h') diff --git a/src/ChunkData.h b/src/ChunkData.h index 6bc2b5366..95a38b194 100644 --- a/src/ChunkData.h +++ b/src/ChunkData.h @@ -48,15 +48,15 @@ public: /** Move assign from another cChunkData */ void Assign(cChunkData && a_Other); - BLOCKTYPE GetBlock(int a_X, int a_Y, int a_Z) const; - void SetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_Block); + BLOCKTYPE GetBlock(Vector3i a_RelPos) const; + void SetBlock(Vector3i a_RelPos, BLOCKTYPE a_Block); - NIBBLETYPE GetMeta(int a_RelX, int a_RelY, int a_RelZ) const; - bool SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Nibble); + NIBBLETYPE GetMeta(Vector3i a_RelPos) const; + bool SetMeta(Vector3i a_RelPos, NIBBLETYPE a_Nibble); - NIBBLETYPE GetBlockLight(int a_RelX, int a_RelY, int a_RelZ) const; + NIBBLETYPE GetBlockLight(Vector3i a_RelPos) const; - NIBBLETYPE GetSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; + NIBBLETYPE GetSkyLight(Vector3i a_RelPos) const; /** Return a pointer to the chunk section or nullptr if all air */ const sChunkSection * GetSection(size_t a_SectionNum) const; -- cgit v1.2.3