diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt index 3d5d3c2ad..8b68ed68b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt @@ -149,17 +149,7 @@ class ExoSuitInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen return ItemStack.EMPTY } - if (combinedInventorySlots.any { it.index == slotIndex }) { - val item = slots[slotIndex].item - val copy = item.copy() - moveItemStackTo(item, hotbarSlots) - return copy - } else if (hotbarSlots.any { it.index == slotIndex } || craftingSlots.any { it.index == slotIndex }) { - val item = slots[slotIndex].item - val copy = item.copy() - moveItemStackTo(item, combinedInventorySlots) - return copy - } else if (slotIndex == craftingResultSlot.index) { + if (slotIndex == craftingResultSlot.index) { val item = craftingResultSlot.item val leftover = moveItemStackToSlots(item, combinedInventorySlots, simulate = true) @@ -172,6 +162,16 @@ class ExoSuitInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen } return ItemStack.EMPTY + } else if (combinedInventorySlots.any { it.index == slotIndex }) { + val item = slots[slotIndex].item + val copy = item.copy() + moveItemStackTo(item, hotbarSlots) + return copy + } else if (hotbarSlots.any { it.index == slotIndex } || craftingSlots.any { it.index == slotIndex }) { + val item = slots[slotIndex].item + val copy = item.copy() + moveItemStackTo(item, combinedInventorySlots) + return copy } return ItemStack.EMPTY