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 6f13df36d..dbe79b18a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ExoSuitInventoryMenu.kt @@ -146,11 +146,11 @@ class ExoSuitInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen if (slotIndex == craftingResultSlot.index) { val item = craftingResultSlot.item - val leftover = moveItemStackToSlots(item, playerInventorySlots, simulate = true) + val leftover = moveItemStackToSlots(item, playerInventorySlots2, simulate = true) if (leftover.isEmpty) { val copy = item.copy() - moveItemStackToSlots(item, playerInventorySlots, simulate = false) + moveItemStackToSlots(item, playerInventorySlots2, simulate = false) item.count = 0 craftingResultSlot.onTake(ply, copy) return copy diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt index 5027c74df..190e67d19 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt @@ -36,6 +36,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor( val matteryWidgets: List = Collections.unmodifiableList(_matteryWidgets) private val _playerInventorySlots = ArrayList() + private val _playerInventorySlots2 = ArrayList() private val _playerHotbarSlots = ArrayList() private val _playerMainSlots = ArrayList() private val _playerExoSuitSlots = ArrayList() @@ -46,6 +47,11 @@ abstract class MatteryMenu @JvmOverloads protected constructor( */ val playerInventorySlots: List = Collections.unmodifiableList(_playerInventorySlots) + /** + * hotbar + inventory + exosuit (in this order) + */ + val playerInventorySlots2: List = Collections.unmodifiableList(_playerInventorySlots2) + /** * hotbar only */ @@ -166,6 +172,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor( val slot = InventorySlot(inventory, i) _playerInventorySlots.add(slot) + _playerInventorySlots2.add(slot) _playerMainSlots.add(slot) _playerCombinedInventorySlots.add(slot) addSlot(slot) @@ -178,6 +185,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor( val slot = InventorySlot(mattery.exoSuitContainer, i) _playerInventorySlots.add(slot) + _playerInventorySlots2.add(slot) _playerExoSuitSlots.add(slot) _playerCombinedInventorySlots.add(slot) addSlot(slot) @@ -188,6 +196,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor( val slot = InventorySlot(inventory, i) addSlot(slot) + _playerInventorySlots2.add(i, slot) _playerInventorySlots.add(slot) _playerHotbarSlots.add(slot) }