Change condition order
since players most of time quick move crafting result
This commit is contained in:
parent
c8c4e2931f
commit
6beab09cb6
@ -149,17 +149,7 @@ class ExoSuitInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
|
|||||||
return ItemStack.EMPTY
|
return ItemStack.EMPTY
|
||||||
}
|
}
|
||||||
|
|
||||||
if (combinedInventorySlots.any { it.index == slotIndex }) {
|
if (slotIndex == craftingResultSlot.index) {
|
||||||
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) {
|
|
||||||
val item = craftingResultSlot.item
|
val item = craftingResultSlot.item
|
||||||
val leftover = moveItemStackToSlots(item, combinedInventorySlots, simulate = true)
|
val leftover = moveItemStackToSlots(item, combinedInventorySlots, simulate = true)
|
||||||
|
|
||||||
@ -172,6 +162,16 @@ class ExoSuitInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ItemStack.EMPTY
|
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
|
return ItemStack.EMPTY
|
||||||
|
Loading…
Reference in New Issue
Block a user