Fix slot panel quick move display

This commit is contained in:
DBotThePony 2024-01-01 14:45:37 +07:00
parent c4bcab44e4
commit da4c1108c2
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -74,10 +74,10 @@ open class SlotPanel<out S : MatteryScreen<*>, out T : Slot> @JvmOverloads const
screen.quickCraftSlots, screen.quickCraftSlots,
screen.quickCraftingType, screen.quickCraftingType,
itemstack, 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) { if (itemstack.count > k) {
countOverride = ChatFormatting.YELLOW.toString() + k countOverride = ChatFormatting.YELLOW.toString() + k