aboutsummaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/player.h b/src/player.h
index beca82f66..248ae9388 100644
--- a/src/player.h
+++ b/src/player.h
@@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "constants.h"
#include "network/networkprotocol.h"
#include "util/basic_macros.h"
+#include "util/pointedthing.h"
#include <list>
#include <mutex>
@@ -187,6 +188,10 @@ public:
// Returns non-empty `selected` ItemStack. `hand` is a fallback, if specified
ItemStack &getWieldedItem(ItemStack *selected, ItemStack *hand) const;
+
+ // item currently in secondary hand is returned in `offhand`
+ // item to use for place / secondary_use (either main or offhand) is (optionally) returned in `place`
+ bool getOffhandWieldedItem(ItemStack *offhand, ItemStack *place, IItemDefManager *idef, const PointedThing &pointed) const;
void setWieldIndex(u16 index);
u16 getWieldIndex() const { return m_wield_index; }