From 8947147c25e2640519897bfdc8807e97ee291d70 Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Fri, 2 Oct 2020 00:33:32 +0300 Subject: Enchanting table shows detail on hover. Enchanting is deterministic. (#4937) * Use lapis for enchanting, subtract correct number of levels, ClientHandle now selects from pregenerated list. Co-authored-by: Tiger Wang --- src/UI/SlotArea.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/UI/SlotArea.h') diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index d363a72e6..acf8c404b 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -397,14 +397,20 @@ public: virtual void OnPlayerAdded (cPlayer & a_Player) override; virtual void OnPlayerRemoved(cPlayer & a_Player) override; - /* Get the count of bookshelves who stand in the near of the enchanting table */ - int GetBookshelvesCount(cWorld & a_World); + /* Get the number of bookshelves which are near the enchanting table */ + unsigned GetBookshelvesCount(cWorld & a_World); + + /* Return the enchanted item matching the chosen option (0, 1, 2) + Ownership of the cItem is transferred to the caller. */ + cItem SelectEnchantedOption(size_t a_EnchantOption); protected: + /** Handles a click in the item slot. */ void UpdateResult(cPlayer & a_Player); Vector3i m_BlockPos; + std::array m_EnchantedItemOptions; }; -- cgit v1.2.3