示例#1
0
        static int _g_get_CurrentItem(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Minecraft.InventoryManager gen_to_be_invoked = (Minecraft.InventoryManager)translator.FastGetCSObj(L, 1);
                translator.PushMinecraftItemsDataItemType(L, gen_to_be_invoked.CurrentItem);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
示例#2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    Minecraft.InventoryManager gen_ret = new Minecraft.InventoryManager();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to Minecraft.InventoryManager constructor!"));
        }
示例#3
0
        static int _m_SetItem(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Minecraft.InventoryManager gen_to_be_invoked = (Minecraft.InventoryManager)translator.FastGetCSObj(L, 1);



                {
                    int _index = LuaAPI.xlua_tointeger(L, 2);
                    Minecraft.ItemsData.ItemType _type; translator.Get(L, 3, out _type);

                    gen_to_be_invoked.SetItem(_index, _type);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }