mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-14 04:09:09 +01:00
Merge remote-tracking branch 'origin/1.10.2' into 1.10.2
This commit is contained in:
commit
1846d52e50
1 changed files with 16 additions and 1 deletions
|
@ -56,7 +56,22 @@ public class ItemBag extends ItemBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){
|
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){
|
||||||
tooltip.add(TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".previously"+(this.isVoid ? "VoidBag" : "Bag")));
|
ItemStack[] slots = new ItemStack[ContainerBag.getSlotAmount(this.isVoid)];
|
||||||
|
ItemDrill.loadSlotsFromNBT(slots, stack);
|
||||||
|
|
||||||
|
int slotsTotal = slots.length;
|
||||||
|
int slotsFilled = 0;
|
||||||
|
|
||||||
|
for(ItemStack slotStack : slots){
|
||||||
|
if(StackUtil.isValid(slotStack)){
|
||||||
|
slotsFilled++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// don't count the filter 4 slots
|
||||||
|
slotsTotal = slotsTotal - 4;
|
||||||
|
|
||||||
|
tooltip.add(TextFormatting.ITALIC.toString()+slotsFilled+"/"+slotsTotal+" filled slots");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
Loading…
Reference in a new issue