diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/ChunkInterface.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/Blocks/ChunkInterface.cpp b/src/Blocks/ChunkInterface.cpp index 1f2a97d08..44119a0d8 100644 --- a/src/Blocks/ChunkInterface.cpp +++ b/src/Blocks/ChunkInterface.cpp @@ -10,28 +10,18 @@ - -BLOCKTYPE cChunkInterface::GetBlock(int a_BlockX, int a_BlockY, int a_BlockZ) -{ - return m_ChunkMap->GetBlock(a_BlockX, a_BlockY, a_BlockZ); -} - - - - - -BLOCKTYPE cChunkInterface::GetBlock(const Vector3i & a_Pos) +BLOCKTYPE cChunkInterface::GetBlock(Vector3i a_Pos) { - return GetBlock(a_Pos.x, a_Pos.y, a_Pos.z); + return m_ChunkMap->GetBlock(a_Pos.x, a_Pos.y, a_Pos.z); } -NIBBLETYPE cChunkInterface::GetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ) +NIBBLETYPE cChunkInterface::GetBlockMeta(Vector3i a_Pos) { - return m_ChunkMap->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); + return m_ChunkMap->GetBlockMeta(a_Pos.x, a_Pos.y, a_Pos.z); } @@ -39,9 +29,9 @@ NIBBLETYPE cChunkInterface::GetBlockMeta(int a_BlockX, int a_BlockY, int a_Block -bool cChunkInterface::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) +bool cChunkInterface::GetBlockTypeMeta(Vector3i a_Pos, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta) { - return m_ChunkMap->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta); + return m_ChunkMap->GetBlockTypeMeta(a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta); } @@ -125,7 +115,7 @@ bool cChunkInterface::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a bool cChunkInterface::DigBlock(cWorldInterface & a_WorldInterface, int a_X, int a_Y, int a_Z) { - cBlockHandler * Handler = cBlockInfo::GetHandler(GetBlock(a_X, a_Y, a_Z)); + cBlockHandler * Handler = cBlockInfo::GetHandler(GetBlock({a_X, a_Y, a_Z})); Handler->OnDestroyed(*this, a_WorldInterface, a_X, a_Y, a_Z); return m_ChunkMap->DigBlock(a_X, a_Y, a_Z); } |