summaryrefslogtreecommitdiffstats
path: root/src/BlockID.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 18:12:34 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 18:12:34 +0100
commit79e5b823547a2a51d9f4e504fc24ec539e11ac34 (patch)
tree672b77f1c9a4741437b30f3289fc258d7917a2eb /src/BlockID.h
parentCompilation fixes (diff)
parentMerge pull request #1612 from p-mcgowan/pigsIntoZombiePigmenOnLightning (diff)
downloadcuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar.gz
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar.bz2
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar.lz
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar.xz
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.tar.zst
cuberite-79e5b823547a2a51d9f4e504fc24ec539e11ac34.zip
Diffstat (limited to 'src/BlockID.h')
-rw-r--r--src/BlockID.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/BlockID.h b/src/BlockID.h
index bb06722d2..24de2dc8a 100644
--- a/src/BlockID.h
+++ b/src/BlockID.h
@@ -1,7 +1,13 @@
#pragma once
+// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua process the values.
+// ToLua doesn't understand typed enums, so we use preprocessor to hide it from ToLua.
+
+enum ENUM_BLOCK_ID : BLOCKTYPE
+#if 0
+enum ENUM_BLOCK_ID // tolua_export
+#endif
// tolua_begin
-enum ENUM_BLOCK_ID
{
E_BLOCK_AIR = 0,
E_BLOCK_STONE = 1,
@@ -221,6 +227,10 @@ enum ENUM_BLOCK_ID
};
// tolua_end
+
+
+
+
// tolua_begin
enum ENUM_ITEM_ID
{