From 48f933920c2de661ce99c569a2f5ae6685dbba8f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 20 Aug 2023 17:44:09 +0700 Subject: [PATCH] Don't pickup items into exopack inventory if we somehow have no exopack --- .../mc/otm/capability/MatteryPlayerCapability.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index 157a5b1ea..5fa18e795 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -1378,7 +1378,12 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial * This re-implement [Inventory.add] logic (original method is redirected to this) */ fun inventoryAddImpl(stack: ItemStack): Boolean { - inventoryAndExopack.consumeItem(stack, false, popTime = 5) + if (hasExopack) { + inventoryAndExopack.consumeItem(stack, false, popTime = 5) + } else { + wrappedItemInventory.consumeItem(stack, false, popTime = 5) + } + MinecraftForge.EVENT_BUS.post(ItemStackLeftoverEvent(stack, this)) if (ply.abilities.instabuild) {