WAILA now shows all of the items in the chest
This commit is contained in:
parent
d45bd4e85c
commit
1824e0bf36
1 changed files with 12 additions and 6 deletions
|
@ -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<String> 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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue