mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
AE2 Cells don't have extra information they should
This commit is contained in:
parent
2fd3bb4d3a
commit
3868f99798
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user