#include "cpp_api/s_base.h"
#include "irr_v3d.h"
-class PointedThing;
-class ItemStack;
+struct PointedThing;
+struct ItemStack;
class ServerActiveObject;
-class ItemDefinition;
+struct ItemDefinition;
class LuaItemStack;
class ModApiItemMod;
+class InventoryList;
+struct InventoryLocation;
class ScriptApiItem
: virtual public ScriptApiBase
ServerActiveObject *placer, const PointedThing &pointed);
bool item_OnUse(ItemStack &item,
ServerActiveObject *user, const PointedThing &pointed);
+ bool item_OnSecondaryUse(ItemStack &item,
+ ServerActiveObject *user);
+ 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;
friend class ModApiItemMod;
bool getItemCallback(const char *name, const char *callbackname);
-private:
void pushPointedThing(const PointedThing& pointed);
};