Don't pickup items into exopack inventory if we somehow have no exopack
This commit is contained in:
parent
e7c9abcebb
commit
48f933920c
@ -1378,7 +1378,12 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
* This re-implement [Inventory.add] logic (original method is redirected to this)
|
* This re-implement [Inventory.add] logic (original method is redirected to this)
|
||||||
*/
|
*/
|
||||||
fun inventoryAddImpl(stack: ItemStack): Boolean {
|
fun inventoryAddImpl(stack: ItemStack): Boolean {
|
||||||
|
if (hasExopack) {
|
||||||
inventoryAndExopack.consumeItem(stack, false, popTime = 5)
|
inventoryAndExopack.consumeItem(stack, false, popTime = 5)
|
||||||
|
} else {
|
||||||
|
wrappedItemInventory.consumeItem(stack, false, popTime = 5)
|
||||||
|
}
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.post(ItemStackLeftoverEvent(stack, this))
|
MinecraftForge.EVENT_BUS.post(ItemStackLeftoverEvent(stack, this))
|
||||||
|
|
||||||
if (ply.abilities.instabuild) {
|
if (ply.abilities.instabuild) {
|
||||||
|
Loading…
Reference in New Issue
Block a user