summaryrefslogtreecommitdiffstats
path: root/source/cLuaChunk.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-11 21:25:55 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-11 21:25:55 +0200
commit373dac3204519b964710fdc693dd16c400881e1a (patch)
tree3faecd747d1da82cffff2ca45890968354dfeb43 /source/cLuaChunk.h
parentFixed a bug in crafting recipes - would consume multiple items of asterisked ingredients (FS #205) (diff)
downloadcuberite-373dac3204519b964710fdc693dd16c400881e1a.tar
cuberite-373dac3204519b964710fdc693dd16c400881e1a.tar.gz
cuberite-373dac3204519b964710fdc693dd16c400881e1a.tar.bz2
cuberite-373dac3204519b964710fdc693dd16c400881e1a.tar.lz
cuberite-373dac3204519b964710fdc693dd16c400881e1a.tar.xz
cuberite-373dac3204519b964710fdc693dd16c400881e1a.tar.zst
cuberite-373dac3204519b964710fdc693dd16c400881e1a.zip
Diffstat (limited to 'source/cLuaChunk.h')
-rw-r--r--source/cLuaChunk.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/cLuaChunk.h b/source/cLuaChunk.h
new file mode 100644
index 000000000..5e1395a4c
--- /dev/null
+++ b/source/cLuaChunk.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "ChunkDef.h"
+
+class cLuaChunk //tolua_export
+{ //tolua_export
+public:
+ cLuaChunk( cChunkDef::BlockTypes & a_BlockTypes
+ , cChunkDef::BlockNibbles & a_BlockNibbles
+ , cChunkDef::HeightMap & a_HeightMap
+ , cChunkDef::BiomeMap & a_BiomeMap
+ )
+ : m_BiomeMap( a_BiomeMap )
+ , m_BlockTypes( a_BlockTypes )
+ , m_BlockMeta( a_BlockNibbles )
+ , m_HeightMap( a_HeightMap )
+ {}
+ ~cLuaChunk()
+ {}
+
+ void SetBlock( const Vector3i & a_Pos, char a_BlockID, unsigned char a_BlockMeta ) //tolua_export
+ { //tolua_export
+ } //tolua_export
+
+ void FillBlocks( char a_BlockID, unsigned char a_BlockMeta ) //tolua_export
+ { //tolua_export
+ const NIBBLETYPE CompressedMeta = a_BlockMeta | a_BlockMeta << 4;
+ memset( m_BlockTypes, a_BlockID, sizeof( cChunkDef::BlockTypes ) );
+ memset( m_BlockMeta, CompressedMeta, sizeof( cChunkDef::BlockNibbles ) );
+
+ memset( m_BiomeMap, 0, sizeof( cChunkDef::BiomeMap ) );
+ memset( m_HeightMap, 0, sizeof( cChunkDef::HeightMap ) );
+ } //tolua_export
+private:
+ EMCSBiome * m_BiomeMap;
+ BLOCKTYPE * m_BlockTypes;
+ NIBBLETYPE * m_BlockMeta;
+ HEIGHTTYPE * m_HeightMap;
+}; //tolua_export \ No newline at end of file