Removed cBlockEntity:CreateByBlockType() from the Lua API.
Plugins cannot be allowed to create block entities, that would result in memory leaks.
This commit is contained in:
parent
90fc51c4d0
commit
49d6afd501
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Lua binding: AllToLua
|
** Lua binding: AllToLua
|
||||||
** Generated automatically by tolua++-1.0.92 on 11/15/13 09:35:12.
|
** Generated automatically by tolua++-1.0.92 on 11/15/13 10:14:19.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
@ -17578,46 +17578,6 @@ tolua_lerror:
|
|||||||
}
|
}
|
||||||
#endif //#ifndef TOLUA_DISABLE
|
#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 */
|
/* method: GetPosX of class cBlockEntity */
|
||||||
#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosX00
|
#ifndef TOLUA_DISABLE_tolua_AllToLua_cBlockEntity_GetPosX00
|
||||||
static int tolua_AllToLua_cBlockEntity_GetPosX00(lua_State* tolua_S)
|
static int tolua_AllToLua_cBlockEntity_GetPosX00(lua_State* tolua_S)
|
||||||
@ -30932,7 +30892,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
|
|||||||
tolua_cclass(tolua_S,"cBlockEntity","cBlockEntity","",NULL);
|
tolua_cclass(tolua_S,"cBlockEntity","cBlockEntity","",NULL);
|
||||||
#endif
|
#endif
|
||||||
tolua_beginmodule(tolua_S,"cBlockEntity");
|
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,"GetPosX",tolua_AllToLua_cBlockEntity_GetPosX00);
|
||||||
tolua_function(tolua_S,"GetPosY",tolua_AllToLua_cBlockEntity_GetPosY00);
|
tolua_function(tolua_S,"GetPosY",tolua_AllToLua_cBlockEntity_GetPosY00);
|
||||||
tolua_function(tolua_S,"GetPosZ",tolua_AllToLua_cBlockEntity_GetPosZ00);
|
tolua_function(tolua_S,"GetPosZ",tolua_AllToLua_cBlockEntity_GetPosZ00);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Lua binding: AllToLua
|
** Lua binding: AllToLua
|
||||||
** Generated automatically by tolua++-1.0.92 on 11/15/13 09:35:13.
|
** Generated automatically by tolua++-1.0.92 on 11/15/13 10:14:20.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exported function */
|
/* Exported function */
|
||||||
|
@ -47,13 +47,13 @@ public:
|
|||||||
m_World = a_World;
|
m_World = a_World;
|
||||||
}
|
}
|
||||||
|
|
||||||
// tolua_begin
|
|
||||||
|
|
||||||
/// Creates a new block entity for the specified block type
|
/// Creates a new block entity for the specified block type
|
||||||
/// If a_World is valid, then the entity is created bound to that world
|
/// If a_World is valid, then the entity is created bound to that world
|
||||||
/// Returns NULL for unknown block types
|
/// 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);
|
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:
|
// Position, in absolute block coordinates:
|
||||||
int GetPosX(void) const { return m_PosX; }
|
int GetPosX(void) const { return m_PosX; }
|
||||||
int GetPosY(void) const { return m_PosY; }
|
int GetPosY(void) const { return m_PosY; }
|
||||||
|
Loading…
Reference in New Issue
Block a user