From 2d3013d1d35a2bcba63cffd9012898defff26f93 Mon Sep 17 00:00:00 2001 From: changyong guo Date: Sun, 24 Jun 2018 17:24:10 +0800 Subject: Support swap item between main hand and offhand by press key "F" (#4241) Hi, I found cuberite don't support to press key "F" to swap items on main hand and offhand, so I implemented this feature. Best regards Changyong --- src/Entities/Entity.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 9abf75968..7ac12c95b 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -351,6 +351,9 @@ public: /** Returns the currently equipped boots; empty item if none */ virtual cItem GetEquippedBoots(void) const { return cItem(); } + /** Returns the currently offhand equipped item; empty item if none */ + virtual cItem GetOffHandEquipedItem(void) const { return cItem(); } + /** Applies damage to the armor after the armor blocked the given amount */ virtual void ApplyArmorDamage(int DamageBlocked); -- cgit v1.2.3