1
0

Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)

* Fix cmake not adding Werror on clang, and _lots_ of warnings

* WIP: Build fixes

* Cannot make intermediate blockhandler instance

* Tiger's changes

* Fix BitIndex check

* Handle invalid NextState values in cMultiVersionProtocol

Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
peterbell10
2020-10-05 11:27:14 +01:00
committed by GitHub
parent 23021dd828
commit a9031b6bae
144 changed files with 886 additions and 862 deletions

View File

@@ -809,10 +809,10 @@ void cClientHandle::HandleEnchantItem(UInt8 a_WindowID, UInt8 a_Enchantment)
const auto DeltaForPercent = CurrentFillPercent * (m_Player->XpForLevel(TargetLevel + 1) - m_Player->XpForLevel(TargetLevel));
// Apply the experience delta:
m_Player->DeltaExperience(DeltaForLevel + DeltaForPercent);
m_Player->DeltaExperience(FloorC(DeltaForLevel + DeltaForPercent));
// Now reduce the lapis in our stack and send it back:
LapisStack.AddCount(-LapisRequired);
LapisStack.AddCount(static_cast<char>(-LapisRequired));
Window->m_SlotArea->SetSlot(1, *m_Player, LapisStack);
}
else