From 1824e0bf364a3d30c915b62e74b1ab519f70397f Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Mon, 13 Apr 2015 20:06:20 +0100 Subject: [PATCH] WAILA now shows all of the items in the chest --- .../techreborn/tiles/TileQuantumChest.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/techreborn/tiles/TileQuantumChest.java b/src/main/java/techreborn/tiles/TileQuantumChest.java index 78158357e..12ba69599 100644 --- a/src/main/java/techreborn/tiles/TileQuantumChest.java +++ b/src/main/java/techreborn/tiles/TileQuantumChest.java @@ -1,9 +1,6 @@ package techreborn.tiles; import ic2.api.tile.IWrenchable; - -import java.util.List; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -15,6 +12,8 @@ import techreborn.init.ModBlocks; import techreborn.util.Inventory; import techreborn.util.ItemUtils; +import java.util.List; + public class TileQuantumChest extends TileMachineBase implements IInventory ,IWrenchable{ @@ -218,10 +217,17 @@ public class TileQuantumChest extends TileMachineBase implements IInventory ,IWr @Override public void addWailaInfo(List info) { super.addWailaInfo(info); + int size = 0; + String name = "of nothing"; if(storedItem != null){ - info.add(storedItem.stackSize + " of " + storedItem.getItem().getItemStackDisplayName(storedItem)); - } else { - info.add("Empty"); + name = storedItem.getDisplayName(); + size += storedItem.stackSize; } + if( getStackInSlot(1) != null){ + name = getStackInSlot(1).getDisplayName(); + size += getStackInSlot(1).stackSize; + } + info.add(size + " " + name); + } }