Fix quick move not displaying proper item counts

This commit is contained in:
DBotThePony 2023-07-22 12:31:58 +07:00
parent c887025a6c
commit dc2661db9a
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -71,13 +71,12 @@ open class SlotPanel<out S : MatteryScreen<*>, 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