#include <l_itemstackmeta.h>
Public Member Functions | |
ItemStackMetaRef (ItemStack *istack) | |
~ItemStackMetaRef ()=default | |
Public Member Functions inherited from MetaDataRef | |
virtual | ~MetaDataRef ()=default |
Static Public Member Functions | |
static void | create (lua_State *L, ItemStack *istack) |
static void | Register (lua_State *L) |
Static Public Member Functions inherited from ModApiBase | |
static ScriptApiBase * | getScriptApiBase (lua_State *L) |
static Server * | getServer (lua_State *L) |
static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
static Client * | getClient (lua_State *L) |
static GUIEngine * | getGuiEngine (lua_State *L) |
static IGameDef * | getGameDef (lua_State *L) |
static Environment * | getEnv (lua_State *L) |
static std::string | getCurrentModPath (lua_State *L) |
template<typename T > | |
static T * | getScriptApi (lua_State *L) |
static bool | registerFunction (lua_State *L, const char *name, lua_CFunction func, int top) |
static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
A wrapper for deprecated functions. More... | |
Private Member Functions | |
virtual Metadata * | getmeta (bool auto_create) |
virtual void | clearMeta () |
virtual void | reportMetadataChange (const std::string *name=nullptr) |
void | setToolCapabilities (const ToolCapabilities &caps) |
void | clearToolCapabilities () |
Static Private Member Functions | |
static ItemStackMetaRef * | checkobject (lua_State *L, int narg) |
static int | l_set_tool_capabilities (lua_State *L) |
static int | gc_object (lua_State *L) |
Private Attributes | |
ItemStack * | istack = nullptr |
Static Private Attributes | |
static const char | className [] = "ItemStackMetaRef" |
static const luaL_Reg | methods [] |
Additional Inherited Members | |
Protected Member Functions inherited from MetaDataRef | |
virtual void | handleToTable (lua_State *L, Metadata *meta) |
virtual bool | handleFromTable (lua_State *L, int table, Metadata *meta) |
Protected Member Functions inherited from LuaHelper | |
template<> | |
bool | readParam (lua_State *L, int index) |
Static Protected Member Functions inherited from MetaDataRef | |
static MetaDataRef * | checkobject (lua_State *L, int narg) |
static int | l_contains (lua_State *L) |
static int | l_get (lua_State *L) |
static int | l_get_string (lua_State *L) |
static int | l_set_string (lua_State *L) |
static int | l_get_int (lua_State *L) |
static int | l_set_int (lua_State *L) |
static int | l_get_float (lua_State *L) |
static int | l_set_float (lua_State *L) |
static int | l_to_table (lua_State *L) |
static int | l_from_table (lua_State *L) |
static int | l_equals (lua_State *L) |
Static Protected Member Functions inherited from LuaHelper | |
static bool | isNaN (lua_State *L, int idx) |
template<typename T > | |
static T | readParam (lua_State *L, int index) |
Read a value using a template type T from Lua State L and index. More... | |
template<typename T > | |
static T | readParam (lua_State *L, int index, const T &default_value) |
Read a value using a template type T from Lua State L and index. More... | |
|
inline |
|
default |
|
staticprivate |
References className.
Referenced by l_set_tool_capabilities().
|
privatevirtual |
Implements MetaDataRef.
References ItemStackMetadata::clear(), istack, and ItemStack::metadata.
|
inlineprivate |
References ItemStackMetadata::clearToolCapabilities(), istack, and ItemStack::metadata.
Referenced by l_set_tool_capabilities().
|
static |
References ItemStackMetaRef(), className, and istack.
Referenced by LuaItemStack::l_get_meta().
|
staticprivate |
|
privatevirtual |
Implements MetaDataRef.
References istack, and ItemStack::metadata.
|
staticprivate |
References checkobject(), clearToolCapabilities(), read_tool_capabilities(), and setToolCapabilities().
|
static |
References className, gc_object(), MetaDataRef::l_equals(), and methods.
Referenced by ClientScripting::InitializeModApi(), and ServerScripting::InitializeModApi().
|
privatevirtual |
Reimplemented from MetaDataRef.
|
inlineprivate |
References istack, ItemStack::metadata, and ItemStackMetadata::setToolCapabilities().
Referenced by l_set_tool_capabilities().
|
staticprivate |
Referenced by checkobject(), create(), and Register().
|
private |
Referenced by clearMeta(), clearToolCapabilities(), create(), getmeta(), and setToolCapabilities().
|
staticprivate |
Referenced by Register().