Deny ProcessingInventories from Mounted Storage

This commit is contained in:
simibubi 2021-06-09 17:16:10 +02:00
parent 971ce29b6a
commit 2852756a68

View File

@ -1,6 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement; package com.simibubi.create.content.contraptions.components.structureMovement;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.processing.ProcessingInventory;
import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock;
import com.simibubi.create.content.logistics.block.inventories.BottomlessItemHandler; import com.simibubi.create.content.logistics.block.inventories.BottomlessItemHandler;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
@ -44,7 +45,8 @@ public class MountedStorage {
return true; return true;
LazyOptional<IItemHandler> capability = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY); LazyOptional<IItemHandler> capability = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY);
return capability.orElse(null) instanceof ItemStackHandler; IItemHandler handler = capability.orElse(null);
return handler instanceof ItemStackHandler && !(handler instanceof ProcessingInventory);
} }
public MountedStorage(TileEntity te) { public MountedStorage(TileEntity te) {