summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-01 18:48:44 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-01 18:48:44 +0100
commit0d26e81ab56f7a945af23034878e0487aa65800f (patch)
tree2acb54403850d8225d9d445e97ede81fe12c5934 /src/Blocks
parentFinal implementation of MetaRotater (diff)
parentMerge pull request #735 from xdot/master (diff)
downloadcuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.gz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.bz2
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.lz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.xz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.zst
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/ChunkInterface.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h
index b30eff1e4..be7c2e0e5 100644
--- a/src/Blocks/ChunkInterface.h
+++ b/src/Blocks/ChunkInterface.h
@@ -5,31 +5,35 @@
#include "../ForEachChunkProvider.h"
#include "WorldInterface.h"
-class cBlockHandler;
-class cChunkInterface : public cForEachChunkProvider
+
+
+
+class cChunkInterface:
+ public cForEachChunkProvider
{
public:
cChunkInterface(cChunkMap * a_ChunkMap) : m_ChunkMap(a_ChunkMap) {}
- BLOCKTYPE GetBlock (int a_BlockX, int a_BlockY, int a_BlockZ)
+ BLOCKTYPE GetBlock(int a_BlockX, int a_BlockY, int a_BlockZ)
{
return m_ChunkMap->GetBlock(a_BlockX,a_BlockY,a_BlockZ);
}
- BLOCKTYPE GetBlock (const Vector3i & a_Pos )
+ BLOCKTYPE GetBlock(const Vector3i & a_Pos)
{
- return GetBlock( a_Pos.x, a_Pos.y, a_Pos.z );
+ return GetBlock(a_Pos.x, a_Pos.y, a_Pos.z);
}
- NIBBLETYPE GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ)
+ NIBBLETYPE GetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ)
{
return m_ChunkMap->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
}
- bool GetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta)
+ bool GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta)
{
return m_ChunkMap->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
}
+
/** Sets the block at the specified coords to the specified value.
Full processing, incl. updating neighbors, is performed.
*/
@@ -37,7 +41,8 @@ public:
{
m_ChunkMap->SetBlock(a_WorldInterface, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
}
- void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData)
+
+ void SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData)
{
m_ChunkMap->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_MetaData);
}
@@ -55,7 +60,11 @@ public:
{
m_ChunkMap->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
}
- void FastSetBlock(const Vector3i & a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta ) { FastSetBlock( a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta ); }
+
+ void FastSetBlock(const Vector3i & a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta )
+ {
+ FastSetBlock( a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta );
+ }
void UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
{
@@ -77,3 +86,7 @@ public:
private:
cChunkMap * m_ChunkMap;
};
+
+
+
+