summaryrefslogtreecommitdiffstats
path: root/src/Blocks/ChunkInterface.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-25 20:14:14 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-25 20:14:14 +0100
commit15b92af166e03e3deb8baf5eb2ec6b0be5981646 (patch)
tree49367551eb466edce81ed6f68507ab60c6efe3df /src/Blocks/ChunkInterface.h
parentdded dependecy on Blocks to Generator (diff)
downloadcuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar.gz
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar.bz2
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar.lz
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar.xz
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.tar.zst
cuberite-15b92af166e03e3deb8baf5eb2ec6b0be5981646.zip
Diffstat (limited to 'src/Blocks/ChunkInterface.h')
-rw-r--r--src/Blocks/ChunkInterface.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h
new file mode 100644
index 000000000..91a635dcf
--- /dev/null
+++ b/src/Blocks/ChunkInterface.h
@@ -0,0 +1,26 @@
+
+#pragma once
+
+class cChunkInterface
+{
+public:
+
+ BLOCKTYPE GetBlock (int a_BlockX, int a_BlockY, int a_BlockZ);
+ BLOCKTYPE GetBlock (const Vector3i & a_Pos ) { return GetBlock( a_Pos.x, a_Pos.y, a_Pos.z ); }
+ NIBBLETYPE GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ);
+
+ /** Sets the block at the specified coords to the specified value.
+ Full processing, incl. updating neighbors, is performed.
+ */
+ void SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
+
+
+ /** 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 FastSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE 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 DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, bool a_CanCauseFire, eExplosionSource a_Source, void * a_SourceData);
+};