summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 09:23:39 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 09:23:39 +0200
commit0130e73316c249786ce1e64a6f583ac89692c3e4 (patch)
treeb37b831d12902a8796125c8deae0709268bc7d8b
parentSlight refactoring of BlockHandlers - dropping unneeded virtual functions (diff)
downloadcuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar.gz
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar.bz2
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar.lz
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar.xz
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.tar.zst
cuberite-0130e73316c249786ce1e64a6f583ac89692c3e4.zip
Diffstat (limited to '')
-rw-r--r--source/Bindings.cpp47
-rw-r--r--source/Bindings.h2
-rw-r--r--source/Defines.h13
3 files changed, 54 insertions, 8 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 98dffae12..38655ec08 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 09/24/12 00:25:03.
+** Generated automatically by tolua++-1.0.92 on 10/03/12 09:15:14.
*/
#ifndef __cplusplus
@@ -11529,6 +11529,38 @@ static int tolua_AllToLua_cWorld_FastSetBlock00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* method: FastSetBlock of class cWorld */
+#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_FastSetBlock01
+static int tolua_AllToLua_cWorld_FastSetBlock01(lua_State* tolua_S)
+{
+ tolua_Error tolua_err;
+ if (
+ !tolua_isusertype(tolua_S,1,"cWorld",0,&tolua_err) ||
+ (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3i",0,&tolua_err)) ||
+ !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
+ !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
+ !tolua_isnoobj(tolua_S,5,&tolua_err)
+ )
+ goto tolua_lerror;
+ else
+ {
+ cWorld* self = (cWorld*) tolua_tousertype(tolua_S,1,0);
+ const Vector3i* a_Pos = ((const Vector3i*) tolua_tousertype(tolua_S,2,0));
+ unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,3,0));
+ unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,4,0));
+#ifndef TOLUA_RELEASE
+ if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FastSetBlock'", NULL);
+#endif
+ {
+ self->FastSetBlock(*a_Pos,a_BlockType,a_BlockMeta);
+ }
+ }
+ return 0;
+tolua_lerror:
+ return tolua_AllToLua_cWorld_FastSetBlock00(tolua_S);
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: GetBlock of class cWorld */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetBlock00
static int tolua_AllToLua_cWorld_GetBlock00(lua_State* tolua_S)
@@ -21180,6 +21212,17 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_BLOCK_TRIPWIRE_HOOK",E_BLOCK_TRIPWIRE_HOOK);
tolua_constant(tolua_S,"E_BLOCK_TRIPWIRE",E_BLOCK_TRIPWIRE);
tolua_constant(tolua_S,"E_BLOCK_EMERALD_BLOCK",E_BLOCK_EMERALD_BLOCK);
+ tolua_constant(tolua_S,"E_BLOCK_SPRUCE_WOOD_STAIRS",E_BLOCK_SPRUCE_WOOD_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_BIRCH_WOOD_STAIRS",E_BLOCK_BIRCH_WOOD_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_JUNGLE_WOOD_STAIRS",E_BLOCK_JUNGLE_WOOD_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_COMMAND_BLOCK",E_BLOCK_COMMAND_BLOCK);
+ tolua_constant(tolua_S,"E_BLOCK_BEACON",E_BLOCK_BEACON);
+ tolua_constant(tolua_S,"E_BLOCK_COBBLESTONE_WALL",E_BLOCK_COBBLESTONE_WALL);
+ tolua_constant(tolua_S,"E_BLOCK_FLOWER_POT",E_BLOCK_FLOWER_POT);
+ tolua_constant(tolua_S,"E_BLOCK_CARROTS",E_BLOCK_CARROTS);
+ tolua_constant(tolua_S,"E_BLOCK_POTATOES",E_BLOCK_POTATOES);
+ tolua_constant(tolua_S,"E_BLOCK_WOODEN_BUTTON",E_BLOCK_WOODEN_BUTTON);
+ tolua_constant(tolua_S,"E_BLOCK_HEAD",E_BLOCK_HEAD);
tolua_constant(tolua_S,"E_ITEM_EMPTY",E_ITEM_EMPTY);
tolua_constant(tolua_S,"E_ITEM_STONE",E_ITEM_STONE);
tolua_constant(tolua_S,"E_ITEM_GRASS",E_ITEM_GRASS);
@@ -21581,6 +21624,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_array(tolua_S,"g_BlockSpreadLightFalloff",tolua_get_AllToLua_g_BlockSpreadLightFalloff,tolua_set_AllToLua_g_BlockSpreadLightFalloff);
tolua_array(tolua_S,"g_BlockTransparent",tolua_get_AllToLua_g_BlockTransparent,tolua_set_AllToLua_g_BlockTransparent);
tolua_array(tolua_S,"g_BlockOneHitDig",tolua_get_AllToLua_g_BlockOneHitDig,tolua_set_AllToLua_g_BlockOneHitDig);
+ tolua_constant(tolua_S,"BLOCK_FACE_NONE",BLOCK_FACE_NONE);
tolua_constant(tolua_S,"BLOCK_FACE_BOTTOM",BLOCK_FACE_BOTTOM);
tolua_constant(tolua_S,"BLOCK_FACE_TOP",BLOCK_FACE_TOP);
tolua_constant(tolua_S,"BLOCK_FACE_NORTH",BLOCK_FACE_NORTH);
@@ -21963,6 +22007,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,"GenerateChunk",tolua_AllToLua_cWorld_GenerateChunk00);
tolua_function(tolua_S,"SetBlock",tolua_AllToLua_cWorld_SetBlock00);
tolua_function(tolua_S,"FastSetBlock",tolua_AllToLua_cWorld_FastSetBlock00);
+ tolua_function(tolua_S,"FastSetBlock",tolua_AllToLua_cWorld_FastSetBlock01);
tolua_function(tolua_S,"GetBlock",tolua_AllToLua_cWorld_GetBlock00);
tolua_function(tolua_S,"GetBlock",tolua_AllToLua_cWorld_GetBlock01);
tolua_function(tolua_S,"GetBlockMeta",tolua_AllToLua_cWorld_GetBlockMeta00);
diff --git a/source/Bindings.h b/source/Bindings.h
index 3d5bb6be1..2b5822320 100644
--- a/source/Bindings.h
+++ b/source/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 09/24/12 00:25:03.
+** Generated automatically by tolua++-1.0.92 on 10/03/12 09:15:15.
*/
/* Exported function */
diff --git a/source/Defines.h b/source/Defines.h
index 8ad71475b..e2b5a0501 100644
--- a/source/Defines.h
+++ b/source/Defines.h
@@ -21,12 +21,13 @@ extern bool g_BlockOneHitDig[];
// Block face constants, used in PlayerDigging and PlayerBlockPlacement packets
enum
{
- BLOCK_FACE_BOTTOM = 0, // Interacting with the bottom face of the block
- BLOCK_FACE_TOP = 1, // Interacting with the top face of the block
- BLOCK_FACE_NORTH = 2, // Interacting with the northern face of the block
- BLOCK_FACE_SOUTH = 3, // Interacting with the southern face of the block
- BLOCK_FACE_WEST = 4, // Interacting with the western face of the block
- BLOCK_FACE_EAST = 5, // Interacting with the eastern face of the block
+ BLOCK_FACE_NONE = -1, // Interacting with no block face - swinging the item in the air
+ BLOCK_FACE_BOTTOM = 0, // Interacting with the bottom face of the block
+ BLOCK_FACE_TOP = 1, // Interacting with the top face of the block
+ BLOCK_FACE_NORTH = 2, // Interacting with the northern face of the block
+ BLOCK_FACE_SOUTH = 3, // Interacting with the southern face of the block
+ BLOCK_FACE_WEST = 4, // Interacting with the western face of the block
+ BLOCK_FACE_EAST = 5, // Interacting with the eastern face of the block
} ;
// PlayerDigging status constants: