summaryrefslogtreecommitdiffstats
path: root/source/ManualBindings.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-17 21:58:39 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-17 21:58:39 +0200
commite5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d (patch)
treed13286487b7d74dc3c56cf3c529909e31f00b8ff /source/ManualBindings.cpp
parentLogs completion of chunk saving (FS #215) (diff)
downloadcuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar.gz
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar.bz2
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar.lz
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar.xz
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.tar.zst
cuberite-e5fdc133bc6e03c4e8e1f1707ff13f4c836d2b8d.zip
Diffstat (limited to 'source/ManualBindings.cpp')
-rw-r--r--source/ManualBindings.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp
index f01fea278..92414d897 100644
--- a/source/ManualBindings.cpp
+++ b/source/ManualBindings.cpp
@@ -158,10 +158,10 @@ static int FNNAME(lua_State * tolua_S) \
{} \
\
private: \
- virtual bool Item(cEntity * a_Item) override \
+ virtual bool Item(ITEM * a_Item) override \
{ \
lua_rawgeti( LuaState, LUA_REGISTRYINDEX, FuncRef); /* Push function reference */ \
- tolua_pushusertype(LuaState, a_Item, "cEntity"); \
+ tolua_pushusertype(LuaState, a_Item, #ITEM); \
if (TableRef != LUA_REFNIL) \
{ \
lua_rawgeti( LuaState, LUA_REGISTRYINDEX, TableRef); /* Push table reference */ \
@@ -292,7 +292,9 @@ DEFINE_LUA_FOREACH(cWorld, cPlayer, ForEachPlayer, tolua_cWorld_ForEachPlayer);
DEFINE_LUA_FOREACH(cRoot, cWorld, ForEachWorld, tolua_cRoot_ForEachWorld);
DEFINE_LUA_FOREACH(cWorld, cEntity, ForEachEntity, tolua_cWorld_ForEachEntity);
-DEFINE_LUA_FOREACHINCHUNK(cWorld, cEntity, ForEachEntityInChunk, tolua_cWorld_ForEachEntityInChunk);
+DEFINE_LUA_FOREACHINCHUNK(cWorld, cEntity, ForEachEntityInChunk, tolua_cWorld_ForEachEntityInChunk);
+DEFINE_LUA_FOREACHINCHUNK(cWorld, cChestEntity, ForEachChestInChunk, tolua_cWorld_ForEachChestInChunk);
+DEFINE_LUA_FOREACHINCHUNK(cWorld, cFurnaceEntity, ForEachFurnaceInChunk, tolua_cWorld_ForEachFurnaceInChunk);
@@ -594,9 +596,11 @@ void ManualBindings::Bind( lua_State* tolua_S )
tolua_endmodule(tolua_S);
tolua_beginmodule(tolua_S, "cWorld");
- tolua_function(tolua_S, "ForEachPlayer", tolua_cWorld_ForEachPlayer);
- tolua_function(tolua_S, "ForEachEntity", tolua_cWorld_ForEachEntity);
- tolua_function(tolua_S, "ForEachEntityInChunk", tolua_cWorld_ForEachEntityInChunk);
+ tolua_function(tolua_S, "ForEachPlayer", tolua_cWorld_ForEachPlayer);
+ tolua_function(tolua_S, "ForEachEntity", tolua_cWorld_ForEachEntity);
+ tolua_function(tolua_S, "ForEachEntityInChunk", tolua_cWorld_ForEachEntityInChunk);
+ tolua_function(tolua_S, "ForEachChestInChunk", tolua_cWorld_ForEachChestInChunk);
+ tolua_function(tolua_S, "ForEachFurnaceInChunk", tolua_cWorld_ForEachFurnaceInChunk);
tolua_endmodule(tolua_S);
tolua_beginmodule(tolua_S, "cPlugin");