summaryrefslogtreecommitdiffstats
path: root/src/BlockID.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-06-21 15:10:32 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-29 18:58:48 +0200
commit33527067ede2e9f37cc9c2f94548669d7ee92372 (patch)
tree28bcc6b44ddf64774e3bdc08c269967f7ab49b2c /src/BlockID.h
parentUpdated cItemGrid API docs to reflect required GetInventory() calls. (diff)
downloadcuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar.gz
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar.bz2
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar.lz
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar.xz
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.tar.zst
cuberite-33527067ede2e9f37cc9c2f94548669d7ee92372.zip
Diffstat (limited to '')
-rw-r--r--src/BlockID.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/BlockID.h b/src/BlockID.h
index bd24f9312..0f66026b6 100644
--- a/src/BlockID.h
+++ b/src/BlockID.h
@@ -1,15 +1,11 @@
#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.
-
-static const BLOCKTYPE
-#if 0
// tolua_begin
-enum BLOCKTYPE
+
+
+enum ENUM_BLOCK_ID : BLOCKTYPE
{
-#endif
E_BLOCK_AIR = 0,
E_BLOCK_STONE = 1,
E_BLOCK_GRASS = 2,
@@ -265,20 +261,14 @@ enum BLOCKTYPE
E_BLOCK_RED_ROSE = E_BLOCK_FLOWER,
E_BLOCK_WOODEN_DOOR = E_BLOCK_OAK_DOOR,
E_BLOCK_FENCE_GATE = E_BLOCK_OAK_FENCE_GATE,
- E_BLOCK_WOODEN_STAIRS = E_BLOCK_OAK_WOOD_STAIRS
-
-#if 0
-}
-#endif
- ;
-// tolua_end
+ E_BLOCK_WOODEN_STAIRS = E_BLOCK_OAK_WOOD_STAIRS,
+};
-// tolua_begin
-enum ENUM_ITEM_ID
+enum ENUM_ITEM_ID : short
{
E_ITEM_EMPTY = -1,
@@ -514,10 +504,10 @@ enum ENUM_ITEM_ID
-enum
+enum ENUM_BLOCK_META : NIBBLETYPE
{
- // Please keep this list alpha-sorted by the blocktype / itemtype part
- // then number-sorted for the same block / item
+ // Please keep this list alpha-sorted by the blocktype part
+ // then number-sorted for the same block
////////////////////////////////////////////////////////////////////////////////
// Block metas:
@@ -912,6 +902,16 @@ enum
E_META_WOOL_GREEN = 13,
E_META_WOOL_RED = 14,
E_META_WOOL_BLACK = 15,
+};
+
+
+
+
+
+enum ENUM_ITEM_META : short
+{
+ // Please keep this list alpha-sorted by the itemtype part
+ // then number-sorted for the same item
////////////////////////////////////////////////////////////////////////////////
// Item metas: