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
This commit is contained in:
committed by
peterbell10
parent
24603a7640
commit
2d3013d1d3
@@ -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);
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ public:
|
||||
/** Returns the currently equipped boots; empty item if none */
|
||||
virtual cItem GetEquippedBoots(void) const override { return m_Inventory.GetEquippedBoots(); }
|
||||
|
||||
/** Returns the currently offhand equipped item; empty item if none */
|
||||
virtual cItem GetOffHandEquipedItem(void) const override { return m_Inventory.GetShieldSlot(); }
|
||||
|
||||
virtual void ApplyArmorDamage(int DamageBlocked) override;
|
||||
|
||||
// tolua_begin
|
||||
|
||||
Reference in New Issue
Block a user