summaryrefslogtreecommitdiffstats
path: root/src/Blocks/ChunkInterface.cpp
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-11-20 12:13:11 +0100
committerAlexander Harkness <me@bearbin.net>2017-11-20 12:13:11 +0100
commit5badb9bccae803009bde182bf69ee0d02a36b22c (patch)
tree31fabd74fcee1138d4cacd0c437892c68c6defa9 /src/Blocks/ChunkInterface.cpp
parentcItemHandler: Update max stack size of old doors. (#4072) (diff)
downloadcuberite-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.cpp24
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);
}