diff --git a/src/main/scala/li/cil/oc/integration/appeng/ConverterCellInventory.java b/src/main/scala/li/cil/oc/integration/appeng/ConverterCellInventory.java index 594a5cd47..413685308 100644 --- a/src/main/scala/li/cil/oc/integration/appeng/ConverterCellInventory.java +++ b/src/main/scala/li/cil/oc/integration/appeng/ConverterCellInventory.java @@ -3,6 +3,10 @@ package li.cil.oc.integration.appeng; import appeng.api.AEApi; import appeng.api.storage.ICellInventory; import appeng.api.storage.ICellInventoryHandler; +import appeng.api.implementations.items.IStorageCell; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.StorageChannel; +import net.minecraft.item.ItemStack; import li.cil.oc.api.driver.Converter; import java.util.Map; @@ -31,6 +35,11 @@ public final class ConverterCellInventory implements Converter { output.put("name", cell.getItemStack().getDisplayName()); } else if (value instanceof ICellInventoryHandler) { convert(((ICellInventoryHandler) value).getCellInv(), output); + } else if ((value instanceof ItemStack) && (((ItemStack)value).getItem() instanceof IStorageCell)) { + IMEInventoryHandler inventory = AEApi.instance().registries().cell().getCellInventory((ItemStack) value, null, StorageChannel.ITEMS); + if (inventory instanceof ICellInventoryHandler) + convert(((ICellInventoryHandler) inventory).getCellInv(), output); } + } }