From da4c1108c25f91466bb6354be4e60078268cd94b Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 1 Jan 2024 14:45:37 +0700 Subject: [PATCH] Fix slot panel quick move display --- .../dbotthepony/mc/otm/client/screen/panels/slot/SlotPanel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/slot/SlotPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/slot/SlotPanel.kt index 3abd71787..5ec271a7d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/slot/SlotPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/slot/SlotPanel.kt @@ -74,10 +74,10 @@ open class SlotPanel, out T : Slot> @JvmOverloads const screen.quickCraftSlots, screen.quickCraftingType, itemstack, - slot.item.count + if (slot.item.isEmpty) 0 else slot.item.count ) - val k = Math.min(slot.item.count, slot.getMaxStackSize(itemstack)) + val k = itemstack.maxStackSize.coerceAtMost(slot.getMaxStackSize(itemstack)) if (itemstack.count > k) { countOverride = ChatFormatting.YELLOW.toString() + k