Moved growing from cWorld / cChunk to cBlockHandler descendants.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user