]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/serverobject.h
Formspec: Create a new class for inventorylists (#9287)
[dragonfireclient.git] / src / serverobject.h
index c81abb972722dbfcd4cfe00751b108d8a40f42ab..48689fcb49761c6257f0babf6a0e09869d2ccea8 100644 (file)
@@ -133,10 +133,10 @@ class ServerActiveObject : public ActiveObject
        {return true;}
 
        // Returns tool wear
-       virtual int punch(v3f dir,
-                       const ToolCapabilities *toolcap=NULL,
-                       ServerActiveObject *puncher=NULL,
-                       float time_from_last_punch=1000000)
+       virtual u16 punch(v3f dir,
+                       const ToolCapabilities *toolcap = nullptr,
+                       ServerActiveObject *puncher = nullptr,
+                       float time_from_last_punch = 1000000.0f)
        { return 0; }
        virtual void rightClick(ServerActiveObject *clicker)
        {}
@@ -180,7 +180,8 @@ class ServerActiveObject : public ActiveObject
        { return ""; }
        virtual u16 getWieldIndex() const
        { return 0; }
-       virtual ItemStack getWieldedItem() const;
+       virtual ItemStack getWieldedItem(ItemStack *selected,
+                       ItemStack *hand = nullptr) const;
        virtual bool setWieldedItem(const ItemStack &item);
        inline void attachParticleSpawner(u32 id)
        {