diff options
author | Mattes D <github@xoft.cz> | 2019-10-11 11:02:53 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2019-10-28 10:45:43 +0100 |
commit | 61904af626b036b6e4e045ca219b2a361aa45a6e (patch) | |
tree | 60b99ab37c9ec87ca96d403b3254a4da023cf6ac /src/Blocks/ChunkInterface.cpp | |
parent | Update README.md (#4423) (diff) | |
download | cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.gz cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.bz2 cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.lz cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.xz cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.zst cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.zip |
Diffstat (limited to 'src/Blocks/ChunkInterface.cpp')
-rw-r--r-- | src/Blocks/ChunkInterface.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/Blocks/ChunkInterface.cpp b/src/Blocks/ChunkInterface.cpp index 4d6301925..eff3f4da9 100644 --- a/src/Blocks/ChunkInterface.cpp +++ b/src/Blocks/ChunkInterface.cpp @@ -13,7 +13,7 @@ BLOCKTYPE cChunkInterface::GetBlock(Vector3i a_Pos) { - return m_ChunkMap->GetBlock(a_Pos.x, a_Pos.y, a_Pos.z); + return m_ChunkMap->GetBlock(a_Pos); } @@ -22,7 +22,7 @@ BLOCKTYPE cChunkInterface::GetBlock(Vector3i a_Pos) NIBBLETYPE cChunkInterface::GetBlockMeta(Vector3i a_Pos) { - return m_ChunkMap->GetBlockMeta(a_Pos.x, a_Pos.y, a_Pos.z); + return m_ChunkMap->GetBlockMeta(a_Pos); } @@ -47,30 +47,18 @@ void cChunkInterface::SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBL -void cChunkInterface::SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty, bool a_ShouldInformClient) +void cChunkInterface::SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty, bool a_ShouldInformClient) { - m_ChunkMap->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClient); -} - - - - -/** Sets the block at the specified coords to the specified value. -The replacement doesn't trigger block updates. -The replaced blocks aren't checked for block entities (block entity is leaked if it exists at this block) -*/ -void cChunkInterface::FastSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) -{ - m_ChunkMap->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta); + m_ChunkMap->SetBlockMeta(a_BlockPos, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClient); } -void cChunkInterface::FastSetBlock(const Vector3i & a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) +void cChunkInterface::FastSetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) { - FastSetBlock( a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta); + m_ChunkMap->FastSetBlock(a_BlockPos, a_BlockType, a_BlockMeta); } |