From dc2661db9a8a6e7aef76c40b029738d1b3511e09 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 22 Jul 2023 12:31:58 +0700 Subject: [PATCH] Fix quick move not displaying proper item counts --- .../mc/otm/client/screen/panels/slot/SlotPanel.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 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 d2402e13b..a1361b096 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 @@ -71,13 +71,12 @@ open class SlotPanel, out T : Slot> @JvmOverloads const itemstack = carried.copy() dragHit = true - AbstractContainerMenu.getQuickCraftPlaceCount( + val k = Math.min(AbstractContainerMenu.getQuickCraftPlaceCount( screen.quickCraftSlots, screen.quickCraftingType, itemstack - ) + ) + slot.item.count, slot.getMaxStackSize(itemstack)) - val k = Math.min(itemstack.maxStackSize, slot.getMaxStackSize(itemstack)) if (itemstack.count > k) { countOverride = ChatFormatting.YELLOW.toString() + k itemstack.count = k