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;
|
package techreborn.tiles;
|
||||||
|
|
||||||
import ic2.api.tile.IWrenchable;
|
import ic2.api.tile.IWrenchable;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -15,6 +12,8 @@ import techreborn.init.ModBlocks;
|
||||||
import techreborn.util.Inventory;
|
import techreborn.util.Inventory;
|
||||||
import techreborn.util.ItemUtils;
|
import techreborn.util.ItemUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class TileQuantumChest extends TileMachineBase implements IInventory ,IWrenchable{
|
public class TileQuantumChest extends TileMachineBase implements IInventory ,IWrenchable{
|
||||||
|
|
||||||
|
@ -218,10 +217,17 @@ public class TileQuantumChest extends TileMachineBase implements IInventory ,IWr
|
||||||
@Override
|
@Override
|
||||||
public void addWailaInfo(List<String> info) {
|
public void addWailaInfo(List<String> info) {
|
||||||
super.addWailaInfo(info);
|
super.addWailaInfo(info);
|
||||||
|
int size = 0;
|
||||||
|
String name = "of nothing";
|
||||||
if(storedItem != null){
|
if(storedItem != null){
|
||||||
info.add(storedItem.stackSize + " of " + storedItem.getItem().getItemStackDisplayName(storedItem));
|
name = storedItem.getDisplayName();
|
||||||
} else {
|
size += storedItem.stackSize;
|
||||||
info.add("Empty");
|
|
||||||
}
|
}
|
||||||
|
if( getStackInSlot(1) != null){
|
||||||
|
name = getStackInSlot(1).getDisplayName();
|
||||||
|
size += getStackInSlot(1).stackSize;
|
||||||
|
}
|
||||||
|
info.add(size + " " + name);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue