Don't pickup items into exopack inventory if we somehow have no exopack

This commit is contained in:
DBotThePony 2023-08-20 17:44:09 +07:00
parent e7c9abcebb
commit 48f933920c
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -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) {