mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add a callback: minetest.register_on_craft(itemstack, player,
old_craft_grid, craft_inv) and minetest.register_craft_predict(itemstack, player, old_craft_grid, craft_inv)
This commit is contained in:
@@ -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 @@ public:
|
||||
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;
|
||||
|
Reference in New Issue
Block a user