From 071b7be3d4d08c337c01de7abca034e6c3746194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Imrich?= Date: Sat, 3 Apr 2021 19:45:20 +0200 Subject: Basic elytra flight (#5124) * Basic elytra flight Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang --- src/Items/ItemArmor.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/Items/ItemArmor.h') diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h index d91888d5b..3139c09f4 100644 --- a/src/Items/ItemArmor.h +++ b/src/Items/ItemArmor.h @@ -63,14 +63,7 @@ public: } a_Player->GetInventory().SetArmorSlot(SlotNum, a_HeldItem.CopyOne()); - - cItem Item(a_HeldItem); - Item.m_ItemCount--; - if (Item.m_ItemCount <= 0) - { - Item.Empty(); - } - a_Player->GetInventory().SetEquippedItem(Item); + a_Player->GetInventory().RemoveOneEquippedItem(); return true; } @@ -110,6 +103,7 @@ public: { return (a_ItemType == E_ITEM_GOLD); } + case E_ITEM_ELYTRA: // TODO: require Phantom Membrane instead of leather starting from protocol version 369 or 1.13 release case E_ITEM_LEATHER_BOOTS: case E_ITEM_LEATHER_CAP: case E_ITEM_LEATHER_PANTS: -- cgit v1.2.3