diff --git a/src/main/java/appeng/items/storage/ItemCreativeStorageCell.java b/src/main/java/appeng/items/storage/ItemCreativeStorageCell.java index 65094a0e..455c073a 100644 --- a/src/main/java/appeng/items/storage/ItemCreativeStorageCell.java +++ b/src/main/java/appeng/items/storage/ItemCreativeStorageCell.java @@ -19,6 +19,11 @@ package appeng.items.storage; +import appeng.api.AEApi; +import appeng.api.storage.ICellInventoryHandler; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.StorageChannel; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -27,6 +32,7 @@ import appeng.api.storage.ICellWorkbenchItem; import appeng.items.AEBaseItem; import appeng.items.contents.CellConfig; +import java.util.List; public class ItemCreativeStorageCell extends AEBaseItem implements ICellWorkbenchItem { @@ -65,4 +71,23 @@ public class ItemCreativeStorageCell extends AEBaseItem implements ICellWorkbenc { } + + @Override + public void addCheckedInformation(final ItemStack stack, final EntityPlayer player, final List lines, final boolean displayMoreInfo ) + { + final IMEInventoryHandler inventory = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS ); + + if( inventory instanceof ICellInventoryHandler) + { + final CellConfig cc = new CellConfig( stack ); + + for( final ItemStack is : cc ) + { + if( !is.isEmpty() ) + { + lines.add( is.getDisplayName() ); + } + } + } + } }