summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-01 02:46:50 +0100
committermadmaxoft <github@xoft.cz>2014-03-01 02:46:50 +0100
commitaecbf772932792d122d191f8a45b75ddb2756d6f (patch)
tree3aa1c3e07ab95b46d388fa02fc473d905cd40c3d /src/Blocks
parentImproved comments in float size check. (diff)
downloadcuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar.gz
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar.bz2
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar.lz
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar.xz
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.tar.zst
cuberite-aecbf772932792d122d191f8a45b75ddb2756d6f.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..b58c0c086 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;
};
+
+
+
+