]> git.lizzy.rs Git - minetest.git/blobdiff - src/script/cpp_api/s_item.h
Handle LuaErrors in Lua -> C++ calls on LuaJIT
[minetest.git] / src / script / cpp_api / s_item.h
index 0f2b160429d1ec432d4914f3b22b696fa49e90f8..4964dd5b422a467b5674454ae9b5cb9b7417a032 100644 (file)
@@ -29,6 +29,8 @@ class ServerActiveObject;
 struct ItemDefinition;
 class LuaItemStack;
 class ModApiItemMod;
+class InventoryList;
+class InventoryLocation;
 
 class ScriptApiItem
 : virtual public ScriptApiBase
@@ -40,6 +42,10 @@ class ScriptApiItem
                        ServerActiveObject *placer, const PointedThing &pointed);
        bool item_OnUse(ItemStack &item,
                        ServerActiveObject *user, const PointedThing &pointed);
+       bool item_OnCraft(ItemStack &item, ServerActiveObject *user,
+                       const InventoryList *old_craft_grid, const InventoryLocation &craft_inv);
+       bool item_CraftPredict(ItemStack &item, ServerActiveObject *user,
+                       const InventoryList *old_craft_grid, const InventoryLocation &craft_inv);
 
 protected:
        friend class LuaItemStack;