diff options
author | Daniel O'Brien <marmot.daniel@gmail.com> | 2013-11-15 14:07:42 +0100 |
---|---|---|
committer | Daniel O'Brien <marmot.daniel@gmail.com> | 2013-11-15 14:07:42 +0100 |
commit | 5e3614ce873c56c5aefbcf3a073e7ba58c5a7859 (patch) | |
tree | 9b222b739ce4ef5e6062872b6f174e013cd208c7 /source | |
parent | added cProtocol function to pass xp to client (diff) | |
parent | APIDump: Small fixes and additions. (diff) | |
download | cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar.gz cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar.bz2 cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar.lz cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar.xz cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.tar.zst cuberite-5e3614ce873c56c5aefbcf3a073e7ba58c5a7859.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/Bindings.cpp | 605 | ||||
-rw-r--r-- | source/Bindings.h | 2 | ||||
-rw-r--r-- | source/BlockEntities/BlockEntity.h | 4 | ||||
-rw-r--r-- | source/BlockEntities/ChestEntity.cpp | 10 | ||||
-rw-r--r-- | source/BlockEntities/ChestEntity.h | 4 | ||||
-rw-r--r-- | source/BlockEntities/DispenserEntity.cpp | 10 | ||||
-rw-r--r-- | source/BlockEntities/DispenserEntity.h | 3 | ||||
-rw-r--r-- | source/BlockEntities/DropperEntity.cpp | 10 | ||||
-rw-r--r-- | source/BlockEntities/DropperEntity.h | 3 | ||||
-rw-r--r-- | source/BlockEntities/FurnaceEntity.cpp | 23 | ||||
-rw-r--r-- | source/BlockEntities/FurnaceEntity.h | 3 | ||||
-rw-r--r-- | source/BlockEntities/HopperEntity.cpp | 11 | ||||
-rw-r--r-- | source/BlockEntities/HopperEntity.h | 3 | ||||
-rw-r--r-- | source/BlockEntities/SignEntity.cpp | 9 | ||||
-rw-r--r-- | source/BlockEntities/SignEntity.h | 5 | ||||
-rw-r--r-- | source/Generating/ChunkDesc.cpp | 9 | ||||
-rw-r--r-- | source/Root.cpp | 2 |
17 files changed, 41 insertions, 675 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp index cc892a70f..a2dcc58c6 100644 --- a/source/Bindings.cpp +++ b/source/Bindings.cpp @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 11/15/13 18:43:44. +** Generated automatically by tolua++-1.0.92 on 11/15/13 10:14:19. */ #ifndef __cplusplus @@ -70,79 +70,37 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S); /* function to release collected object via destructor */ #ifdef __cplusplus -static int tolua_collect_cItem (lua_State* tolua_S) -{ - cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cFurnaceEntity (lua_State* tolua_S) -{ - cFurnaceEntity* self = (cFurnaceEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cChestEntity (lua_State* tolua_S) -{ - cChestEntity* self = (cChestEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cDispenserEntity (lua_State* tolua_S) -{ - cDispenserEntity* self = (cDispenserEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cCuboid (lua_State* tolua_S) -{ - cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cBlockEntity (lua_State* tolua_S) -{ - cBlockEntity* self = (cBlockEntity*) tolua_tousertype(tolua_S,1,0); - Mtolua_delete(self); - return 0; -} - -static int tolua_collect_cBlockArea (lua_State* tolua_S) +static int tolua_collect_sWebAdminPage (lua_State* tolua_S) { - cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); + sWebAdminPage* self = (sWebAdminPage*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cEnchantments (lua_State* tolua_S) +static int tolua_collect_cBoundingBox (lua_State* tolua_S) { - cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); + cBoundingBox* self = (cBoundingBox*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cLuaWindow (lua_State* tolua_S) +static int tolua_collect_cItem (lua_State* tolua_S) { - cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); + cItem* self = (cItem*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cCraftingGrid (lua_State* tolua_S) +static int tolua_collect_Vector3f (lua_State* tolua_S) { - cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); + Vector3f* self = (Vector3f*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cDropperEntity (lua_State* tolua_S) +static int tolua_collect_cIniFile (lua_State* tolua_S) { - cDropperEntity* self = (cDropperEntity*) tolua_tousertype(tolua_S,1,0); + cIniFile* self = (cIniFile*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -154,44 +112,44 @@ static int tolua_collect_cPickup (lua_State* tolua_S) return 0; } -static int tolua_collect_sWebAdminPage (lua_State* tolua_S) +static int tolua_collect_cItems (lua_State* tolua_S) { - sWebAdminPage* self = (sWebAdminPage*) tolua_tousertype(tolua_S,1,0); + cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cTracer (lua_State* tolua_S) +static int tolua_collect_cBlockArea (lua_State* tolua_S) { - cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); + cBlockArea* self = (cBlockArea*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cBoundingBox (lua_State* tolua_S) +static int tolua_collect_cTracer (lua_State* tolua_S) { - cBoundingBox* self = (cBoundingBox*) tolua_tousertype(tolua_S,1,0); + cTracer* self = (cTracer*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cHopperEntity (lua_State* tolua_S) +static int tolua_collect_cCraftingGrid (lua_State* tolua_S) { - cHopperEntity* self = (cHopperEntity*) tolua_tousertype(tolua_S,1,0); + cCraftingGrid* self = (cCraftingGrid*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_Vector3f (lua_State* tolua_S) +static int tolua_collect_cCuboid (lua_State* tolua_S) { - Vector3f* self = (Vector3f*) tolua_tousertype(tolua_S,1,0); + cCuboid* self = (cCuboid*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cIniFile (lua_State* tolua_S) +static int tolua_collect_cBlockEntity (lua_State* tolua_S) { - cIniFile* self = (cIniFile*) tolua_tousertype(tolua_S,1,0); + cBlockEntity* self = (cBlockEntity*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -203,16 +161,16 @@ static int tolua_collect_Vector3i (lua_State* tolua_S) return 0; } -static int tolua_collect_cItems (lua_State* tolua_S) +static int tolua_collect_cEnchantments (lua_State* tolua_S) { - cItems* self = (cItems*) tolua_tousertype(tolua_S,1,0); + cEnchantments* self = (cEnchantments*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } -static int tolua_collect_cSignEntity (lua_State* tolua_S) +static int tolua_collect_cLuaWindow (lua_State* tolua_S) { - cSignEntity* self = (cSignEntity*) tolua_tousertype(tolua_S,1,0); + cLuaWindow* self = (cLuaWindow*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } @@ -17620,46 +17578,6 @@ tolua_lerror: } #endif //#ifndef TOLUA_DISABLE -/* method: CreateByBlockType of class cBlockEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_CreateByBlockType00 -static int tolua_AllToLua_cBlockEntity_CreateByBlockType00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cBlockEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isusertype(tolua_S,7,"cWorld",1,&tolua_err) || - !tolua_isnoobj(tolua_S,8,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,2,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,3,0)); - int a_BlockX = ((int) tolua_tonumber(tolua_S,4,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,5,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,6,0)); - cWorld* a_World = ((cWorld*) tolua_tousertype(tolua_S,7,NULL)); - { - cBlockEntity* tolua_ret = (cBlockEntity*) cBlockEntity::CreateByBlockType(a_BlockType,a_BlockMeta,a_BlockX,a_BlockY,a_BlockZ,a_World); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cBlockEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'CreateByBlockType'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetPosX of class cBlockEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosX00 static int tolua_AllToLua_cBlockEntity_GetPosX00(lua_State* tolua_S) @@ -18112,75 +18030,6 @@ static int tolua_AllToLua_cBlockEntityWithItems_GetContents00(lua_State* tolua_S } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cChestEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00 -static int tolua_AllToLua_cChestEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cChestEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cChestEntity_new00_local -static int tolua_AllToLua_cChestEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cChestEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cChestEntity* tolua_ret = (cChestEntity*) Mtolua_new((cChestEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cChestEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: AddDropSpenserDir of class cDropSpenserEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00 static int tolua_AllToLua_cDropSpenserEntity_AddDropSpenserDir00(lua_State* tolua_S) @@ -18287,221 +18136,6 @@ static int tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00(lua_State* tolua } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cDispenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDispenserEntity_new00 -static int tolua_AllToLua_cDispenserEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDispenserEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDispenserEntity* tolua_ret = (cDispenserEntity*) Mtolua_new((cDispenserEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDispenserEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cDispenserEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDispenserEntity_new00_local -static int tolua_AllToLua_cDispenserEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDispenserEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDispenserEntity* tolua_ret = (cDispenserEntity*) Mtolua_new((cDispenserEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDispenserEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cDropperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropperEntity_new00 -static int tolua_AllToLua_cDropperEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDropperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDropperEntity* tolua_ret = (cDropperEntity*) Mtolua_new((cDropperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDropperEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cDropperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cDropperEntity_new00_local -static int tolua_AllToLua_cDropperEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cDropperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cDropperEntity* tolua_ret = (cDropperEntity*) Mtolua_new((cDropperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cDropperEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new of class cFurnaceEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cFurnaceEntity_new00 -static int tolua_AllToLua_cFurnaceEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cFurnaceEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); - { - cFurnaceEntity* tolua_ret = (cFurnaceEntity*) Mtolua_new((cFurnaceEntity)(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cFurnaceEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cFurnaceEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cFurnaceEntity_new00_local -static int tolua_AllToLua_cFurnaceEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cFurnaceEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnumber(tolua_S,6,0,&tolua_err) || - !tolua_isnoobj(tolua_S,7,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,5,0)); - unsigned char a_BlockMeta = (( unsigned char) tolua_tonumber(tolua_S,6,0)); - { - cFurnaceEntity* tolua_ret = (cFurnaceEntity*) Mtolua_new((cFurnaceEntity)(a_BlockX,a_BlockY,a_BlockZ,a_BlockType,a_BlockMeta)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cFurnaceEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetInputSlot of class cFurnaceEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cFurnaceEntity_GetInputSlot00 static int tolua_AllToLua_cFurnaceEntity_GetInputSlot00(lua_State* tolua_S) @@ -18825,75 +18459,6 @@ static int tolua_AllToLua_cFurnaceEntity_HasFuelTimeLeft00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cHopperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cHopperEntity_new00 -static int tolua_AllToLua_cHopperEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cHopperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cHopperEntity* tolua_ret = (cHopperEntity*) Mtolua_new((cHopperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cHopperEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cHopperEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cHopperEntity_new00_local -static int tolua_AllToLua_cHopperEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cHopperEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,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 -#endif - { - int a_BlockX = ((int) tolua_tonumber(tolua_S,2,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,4,0)); - { - cHopperEntity* tolua_ret = (cHopperEntity*) Mtolua_new((cHopperEntity)(a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cHopperEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: GetRecord of class cJukeboxEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cJukeboxEntity_GetRecord00 static int tolua_AllToLua_cJukeboxEntity_GetRecord00(lua_State* tolua_S) @@ -19148,79 +18713,6 @@ static int tolua_AllToLua_cNoteEntity_MakeSound00(lua_State* tolua_S) } #endif //#ifndef TOLUA_DISABLE -/* method: new of class cSignEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cSignEntity_new00 -static int tolua_AllToLua_cSignEntity_new00(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cSignEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,2,0)); - int a_BlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,5,0)); - { - cSignEntity* tolua_ret = (cSignEntity*) Mtolua_new((cSignEntity)(a_BlockType,a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cSignEntity"); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - -/* method: new_local of class cSignEntity */ -#ifndef TOLUA_DISABLE_tolua_AllToLua_cSignEntity_new00_local -static int tolua_AllToLua_cSignEntity_new00_local(lua_State* tolua_S) -{ -#ifndef TOLUA_RELEASE - tolua_Error tolua_err; - if ( - !tolua_isusertable(tolua_S,1,"cSignEntity",0,&tolua_err) || - !tolua_isnumber(tolua_S,2,0,&tolua_err) || - !tolua_isnumber(tolua_S,3,0,&tolua_err) || - !tolua_isnumber(tolua_S,4,0,&tolua_err) || - !tolua_isnumber(tolua_S,5,0,&tolua_err) || - !tolua_isnoobj(tolua_S,6,&tolua_err) - ) - goto tolua_lerror; - else -#endif - { - unsigned char a_BlockType = (( unsigned char) tolua_tonumber(tolua_S,2,0)); - int a_BlockX = ((int) tolua_tonumber(tolua_S,3,0)); - int a_BlockY = ((int) tolua_tonumber(tolua_S,4,0)); - int a_BlockZ = ((int) tolua_tonumber(tolua_S,5,0)); - { - cSignEntity* tolua_ret = (cSignEntity*) Mtolua_new((cSignEntity)(a_BlockType,a_BlockX,a_BlockY,a_BlockZ)); - tolua_pushusertype(tolua_S,(void*)tolua_ret,"cSignEntity"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - } - } - return 1; -#ifndef TOLUA_RELEASE - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); - return 0; -#endif -} -#endif //#ifndef TOLUA_DISABLE - /* method: SetLines of class cSignEntity */ #ifndef TOLUA_DISABLE_tolua_AllToLua_cSignEntity_SetLines00 static int tolua_AllToLua_cSignEntity_SetLines00(lua_State* tolua_S) @@ -31400,7 +30892,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_cclass(tolua_S,"cBlockEntity","cBlockEntity","",NULL); #endif tolua_beginmodule(tolua_S,"cBlockEntity"); - tolua_function(tolua_S,"CreateByBlockType",tolua_AllToLua_cBlockEntity_CreateByBlockType00); tolua_function(tolua_S,"GetPosX",tolua_AllToLua_cBlockEntity_GetPosX00); tolua_function(tolua_S,"GetPosY",tolua_AllToLua_cBlockEntity_GetPosY00); tolua_function(tolua_S,"GetPosZ",tolua_AllToLua_cBlockEntity_GetPosZ00); @@ -31419,17 +30910,10 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"SetSlot",tolua_AllToLua_cBlockEntityWithItems_SetSlot01); tolua_function(tolua_S,"GetContents",tolua_AllToLua_cBlockEntityWithItems_GetContents00); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntityWithItems",tolua_collect_cChestEntity); - #else tolua_cclass(tolua_S,"cChestEntity","cChestEntity","cBlockEntityWithItems",NULL); - #endif tolua_beginmodule(tolua_S,"cChestEntity"); tolua_constant(tolua_S,"ContentsHeight",cChestEntity::ContentsHeight); tolua_constant(tolua_S,"ContentsWidth",cChestEntity::ContentsWidth); - tolua_function(tolua_S,"new",tolua_AllToLua_cChestEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cChestEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cChestEntity_new00_local); tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cDropSpenserEntity","cDropSpenserEntity","cBlockEntityWithItems",NULL); tolua_beginmodule(tolua_S,"cDropSpenserEntity"); @@ -31439,40 +30923,19 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"Activate",tolua_AllToLua_cDropSpenserEntity_Activate00); tolua_function(tolua_S,"SetRedstonePower",tolua_AllToLua_cDropSpenserEntity_SetRedstonePower00); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cDispenserEntity","cDispenserEntity","cDropSpenserEntity",tolua_collect_cDispenserEntity); - #else tolua_cclass(tolua_S,"cDispenserEntity","cDispenserEntity","cDropSpenserEntity",NULL); - #endif tolua_beginmodule(tolua_S,"cDispenserEntity"); - tolua_function(tolua_S,"new",tolua_AllToLua_cDispenserEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cDispenserEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cDispenserEntity_new00_local); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cDropperEntity","cDropperEntity","cDropSpenserEntity",tolua_collect_cDropperEntity); - #else tolua_cclass(tolua_S,"cDropperEntity","cDropperEntity","cDropSpenserEntity",NULL); - #endif tolua_beginmodule(tolua_S,"cDropperEntity"); - tolua_function(tolua_S,"new",tolua_AllToLua_cDropperEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cDropperEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cDropperEntity_new00_local); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cFurnaceEntity","cFurnaceEntity","cBlockEntityWithItems",tolua_collect_cFurnaceEntity); - #else tolua_cclass(tolua_S,"cFurnaceEntity","cFurnaceEntity","cBlockEntityWithItems",NULL); - #endif tolua_beginmodule(tolua_S,"cFurnaceEntity"); tolua_constant(tolua_S,"fsInput",cFurnaceEntity::fsInput); tolua_constant(tolua_S,"fsFuel",cFurnaceEntity::fsFuel); tolua_constant(tolua_S,"fsOutput",cFurnaceEntity::fsOutput); tolua_constant(tolua_S,"ContentsWidth",cFurnaceEntity::ContentsWidth); tolua_constant(tolua_S,"ContentsHeight",cFurnaceEntity::ContentsHeight); - tolua_function(tolua_S,"new",tolua_AllToLua_cFurnaceEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cFurnaceEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cFurnaceEntity_new00_local); tolua_function(tolua_S,"GetInputSlot",tolua_AllToLua_cFurnaceEntity_GetInputSlot00); tolua_function(tolua_S,"GetFuelSlot",tolua_AllToLua_cFurnaceEntity_GetFuelSlot00); tolua_function(tolua_S,"GetOutputSlot",tolua_AllToLua_cFurnaceEntity_GetOutputSlot00); @@ -31484,18 +30947,11 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"GetFuelBurnTimeLeft",tolua_AllToLua_cFurnaceEntity_GetFuelBurnTimeLeft00); tolua_function(tolua_S,"HasFuelTimeLeft",tolua_AllToLua_cFurnaceEntity_HasFuelTimeLeft00); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cHopperEntity","cHopperEntity","cBlockEntityWithItems",tolua_collect_cHopperEntity); - #else tolua_cclass(tolua_S,"cHopperEntity","cHopperEntity","cBlockEntityWithItems",NULL); - #endif tolua_beginmodule(tolua_S,"cHopperEntity"); tolua_constant(tolua_S,"ContentsHeight",cHopperEntity::ContentsHeight); tolua_constant(tolua_S,"ContentsWidth",cHopperEntity::ContentsWidth); tolua_constant(tolua_S,"TICKS_PER_TRANSFER",cHopperEntity::TICKS_PER_TRANSFER); - tolua_function(tolua_S,"new",tolua_AllToLua_cHopperEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cHopperEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cHopperEntity_new00_local); tolua_endmodule(tolua_S); tolua_cclass(tolua_S,"cJukeboxEntity","cJukeboxEntity","cBlockEntity",NULL); tolua_beginmodule(tolua_S,"cJukeboxEntity"); @@ -31511,15 +30967,8 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S) tolua_function(tolua_S,"IncrementPitch",tolua_AllToLua_cNoteEntity_IncrementPitch00); tolua_function(tolua_S,"MakeSound",tolua_AllToLua_cNoteEntity_MakeSound00); tolua_endmodule(tolua_S); - #ifdef __cplusplus - tolua_cclass(tolua_S,"cSignEntity","cSignEntity","cBlockEntity",tolua_collect_cSignEntity); - #else tolua_cclass(tolua_S,"cSignEntity","cSignEntity","cBlockEntity",NULL); - #endif tolua_beginmodule(tolua_S,"cSignEntity"); - tolua_function(tolua_S,"new",tolua_AllToLua_cSignEntity_new00); - tolua_function(tolua_S,"new_local",tolua_AllToLua_cSignEntity_new00_local); - tolua_function(tolua_S,".call",tolua_AllToLua_cSignEntity_new00_local); tolua_function(tolua_S,"SetLines",tolua_AllToLua_cSignEntity_SetLines00); tolua_function(tolua_S,"SetLine",tolua_AllToLua_cSignEntity_SetLine00); tolua_function(tolua_S,"GetLine",tolua_AllToLua_cSignEntity_GetLine00); diff --git a/source/Bindings.h b/source/Bindings.h index b17fd02ae..13f398a4d 100644 --- a/source/Bindings.h +++ b/source/Bindings.h @@ -1,6 +1,6 @@ /* ** Lua binding: AllToLua -** Generated automatically by tolua++-1.0.92 on 11/15/13 18:43:45. +** Generated automatically by tolua++-1.0.92 on 11/15/13 10:14:20. */ /* Exported function */ diff --git a/source/BlockEntities/BlockEntity.h b/source/BlockEntities/BlockEntity.h index 6a6ffb448..a2de3160a 100644 --- a/source/BlockEntities/BlockEntity.h +++ b/source/BlockEntities/BlockEntity.h @@ -47,13 +47,13 @@ public: m_World = a_World; } - // tolua_begin - /// Creates a new block entity for the specified block type /// If a_World is valid, then the entity is created bound to that world /// Returns NULL for unknown block types static cBlockEntity * CreateByBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World = NULL); + // tolua_begin + // Position, in absolute block coordinates: int GetPosX(void) const { return m_PosX; } int GetPosY(void) const { return m_PosY; } diff --git a/source/BlockEntities/ChestEntity.cpp b/source/BlockEntities/ChestEntity.cpp index 59193829d..ca2626bc9 100644 --- a/source/BlockEntities/ChestEntity.cpp +++ b/source/BlockEntities/ChestEntity.cpp @@ -11,16 +11,6 @@ -cChestEntity::cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ) : - super(E_BLOCK_CHEST, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, NULL) -{ - cBlockEntityWindowOwner::SetBlockEntity(this); -} - - - - - cChestEntity::cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : super(E_BLOCK_CHEST, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World) { diff --git a/source/BlockEntities/ChestEntity.h b/source/BlockEntities/ChestEntity.h index c6676894f..4f2c21e91 100644 --- a/source/BlockEntities/ChestEntity.h +++ b/source/BlockEntities/ChestEntity.h @@ -34,10 +34,6 @@ public: ContentsWidth = 9, } ; - - /// Constructor used while generating a chunk; sets m_World to NULL - cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ); - // tolua_end /// Constructor used for normal operation diff --git a/source/BlockEntities/DispenserEntity.cpp b/source/BlockEntities/DispenserEntity.cpp index 7edaa8a14..374f3d6e3 100644 --- a/source/BlockEntities/DispenserEntity.cpp +++ b/source/BlockEntities/DispenserEntity.cpp @@ -10,16 +10,6 @@ -cDispenserEntity::cDispenserEntity(int a_BlockX, int a_BlockY, int a_BlockZ) : - super(E_BLOCK_DISPENSER, a_BlockX, a_BlockY, a_BlockZ, NULL) -{ - SetBlockEntity(this); // cBlockEntityWindowOwner -} - - - - - cDispenserEntity::cDispenserEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : super(E_BLOCK_DISPENSER, a_BlockX, a_BlockY, a_BlockZ, a_World) { diff --git a/source/BlockEntities/DispenserEntity.h b/source/BlockEntities/DispenserEntity.h index 5e3327f18..fdfe4e5b4 100644 --- a/source/BlockEntities/DispenserEntity.h +++ b/source/BlockEntities/DispenserEntity.h @@ -15,9 +15,6 @@ class cDispenserEntity : public: - /// Constructor used while generating a chunk; sets m_World to NULL - cDispenserEntity(int a_BlockX, int a_BlockY, int a_BlockZ); - // tolua_end /// Constructor used for normal operation diff --git a/source/BlockEntities/DropperEntity.cpp b/source/BlockEntities/DropperEntity.cpp index 61127cec1..5d4a8ad97 100644 --- a/source/BlockEntities/DropperEntity.cpp +++ b/source/BlockEntities/DropperEntity.cpp @@ -12,16 +12,6 @@ -cDropperEntity::cDropperEntity(int a_BlockX, int a_BlockY, int a_BlockZ) : - super(E_BLOCK_DROPPER, a_BlockX, a_BlockY, a_BlockZ, NULL) -{ - SetBlockEntity(this); // cBlockEntityWindowOwner -} - - - - - cDropperEntity::cDropperEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : super(E_BLOCK_DROPPER, a_BlockX, a_BlockY, a_BlockZ, a_World) { diff --git a/source/BlockEntities/DropperEntity.h b/source/BlockEntities/DropperEntity.h index af74e7f7c..8e07bc6f8 100644 --- a/source/BlockEntities/DropperEntity.h +++ b/source/BlockEntities/DropperEntity.h @@ -23,9 +23,6 @@ class cDropperEntity : public: - /// Constructor used while generating a chunk; sets m_World to NULL - cDropperEntity(int a_BlockX, int a_BlockY, int a_BlockZ); - // tolua_end /// Constructor used for normal operation diff --git a/source/BlockEntities/FurnaceEntity.cpp b/source/BlockEntities/FurnaceEntity.cpp index 2f548d003..ec5ebe8b9 100644 --- a/source/BlockEntities/FurnaceEntity.cpp +++ b/source/BlockEntities/FurnaceEntity.cpp @@ -23,27 +23,6 @@ enum -cFurnaceEntity::cFurnaceEntity(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) : - super(E_BLOCK_FURNACE, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, NULL), - m_BlockType(a_BlockType), - m_BlockMeta(a_BlockMeta), - m_CurrentRecipe(NULL), - m_IsCooking(false), - m_NeedCookTime(0), - m_TimeCooked(0), - m_FuelBurnTime(0), - m_TimeBurned(0), - m_LastProgressFuel(0), - m_LastProgressCook(0) -{ - SetBlockEntity(this); // cBlockEntityWindowOwner - m_Contents.AddListener(*this); -} - - - - - cFurnaceEntity::cFurnaceEntity(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cWorld * a_World) : super(E_BLOCK_FURNACE, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World), m_BlockType(a_BlockType), @@ -57,7 +36,7 @@ cFurnaceEntity::cFurnaceEntity(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTY m_LastProgressFuel(0), m_LastProgressCook(0) { - SetBlockEntity(this); // cBlockEntityWindowOwner + cBlockEntityWindowOwner::SetBlockEntity(this); m_Contents.AddListener(*this); } diff --git a/source/BlockEntities/FurnaceEntity.h b/source/BlockEntities/FurnaceEntity.h index 038f60600..9464fd175 100644 --- a/source/BlockEntities/FurnaceEntity.h +++ b/source/BlockEntities/FurnaceEntity.h @@ -39,9 +39,6 @@ public: ContentsHeight = 1, }; - /// Constructor used while generating a chunk; sets m_World to NULL - cFurnaceEntity(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); - // tolua_end /// Constructor used for normal operation diff --git a/source/BlockEntities/HopperEntity.cpp b/source/BlockEntities/HopperEntity.cpp index c3d7ed3ba..41849b1b3 100644 --- a/source/BlockEntities/HopperEntity.cpp +++ b/source/BlockEntities/HopperEntity.cpp @@ -16,17 +16,6 @@ -cHopperEntity::cHopperEntity(int a_BlockX, int a_BlockY, int a_BlockZ) : - super(E_BLOCK_HOPPER, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, NULL), - m_LastMoveItemsInTick(0), - m_LastMoveItemsOutTick(0) -{ -} - - - - - cHopperEntity::cHopperEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : super(E_BLOCK_HOPPER, a_BlockX, a_BlockY, a_BlockZ, ContentsWidth, ContentsHeight, a_World), m_LastMoveItemsInTick(0), diff --git a/source/BlockEntities/HopperEntity.h b/source/BlockEntities/HopperEntity.h index 1a7650581..3eaa05b7c 100644 --- a/source/BlockEntities/HopperEntity.h +++ b/source/BlockEntities/HopperEntity.h @@ -30,9 +30,6 @@ public: TICKS_PER_TRANSFER = 8, ///< How many ticks at minimum between two item transfers to or from the hopper } ; - /// Constructor used while generating a chunk; sets m_World to NULL - cHopperEntity(int a_BlockX, int a_BlockY, int a_BlockZ); - // tolua_end /// Constructor used for normal operation diff --git a/source/BlockEntities/SignEntity.cpp b/source/BlockEntities/SignEntity.cpp index 8b335651d..81f6f6d77 100644 --- a/source/BlockEntities/SignEntity.cpp +++ b/source/BlockEntities/SignEntity.cpp @@ -12,15 +12,6 @@ -cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_BlockX, int a_BlockY, int a_BlockZ) : - super(a_BlockType, a_BlockX, a_BlockY, a_BlockZ, NULL) -{ -} - - - - - cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorld * a_World) : super(a_BlockType, a_X, a_Y, a_Z, a_World) { diff --git a/source/BlockEntities/SignEntity.h b/source/BlockEntities/SignEntity.h index 50706bdfe..d998ff1e8 100644 --- a/source/BlockEntities/SignEntity.h +++ b/source/BlockEntities/SignEntity.h @@ -33,12 +33,9 @@ class cSignEntity : public: - /// Creates a new empty sign entity at the specified block coords and block type (wall or standing) - /// Used mainly by plugins while generating chunks - cSignEntity(BLOCKTYPE a_BlockType, int a_BlockX, int a_BlockY, int a_BlockZ); - // tolua_end + /// Creates a new empty sign entity at the specified block coords and block type (wall or standing). a_World may be NULL cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorld * a_World); bool LoadFromJson( const Json::Value& a_Value ); diff --git a/source/Generating/ChunkDesc.cpp b/source/Generating/ChunkDesc.cpp index 039f30d9c..9fb306996 100644 --- a/source/Generating/ChunkDesc.cpp +++ b/source/Generating/ChunkDesc.cpp @@ -535,7 +535,14 @@ cBlockEntity * cChunkDesc::GetBlockEntity(int a_RelX, int a_RelY, int a_RelZ) { if (((*itr)->GetPosX() == AbsX) && ((*itr)->GetPosY() == a_RelY) && ((*itr)->GetPosZ() == AbsZ)) { - // Already in the list, return it: + // Already in the list: + if ((*itr)->GetBlockType() != GetBlockType(a_RelX, a_RelY, a_RelZ)) + { + // Wrong type, the block type has been overwritten. Erase and create new: + m_BlockEntities.erase(itr); + break; + } + // Correct type, already present. Return it: return *itr; } } // for itr - m_BlockEntities[] diff --git a/source/Root.cpp b/source/Root.cpp index 701832be7..be5a0553c 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -489,7 +489,7 @@ void cRoot::SaveAllChunks(void) { for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr) { - itr->second->SaveAllChunks(); + itr->second->QueueSaveAllChunks(); } } |