diff options
author | Bond-009 <bond.009@outlook.com> | 2017-11-20 12:13:11 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-11-20 12:13:11 +0100 |
commit | 5badb9bccae803009bde182bf69ee0d02a36b22c (patch) | |
tree | 31fabd74fcee1138d4cacd0c437892c68c6defa9 /src/Blocks/ChunkInterface.cpp | |
parent | cItemHandler: Update max stack size of old doors. (#4072) (diff) | |
download | cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.gz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.bz2 cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.lz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.xz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.zst cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.zip |
Diffstat (limited to 'src/Blocks/ChunkInterface.cpp')
-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); } |