fix not searching if items were in offhand <3

uwu big brain moment and thats on keeping it a 1liner
This commit is contained in:
pol-y-mer 2020-03-06 13:37:17 -05:00
parent 5ba32a8aab
commit d44d165f14
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class InfoOverlay extends Module {
}
public static int getItems(Item i) {
return mc.player.inventory.mainInventory.stream().filter(itemStack -> itemStack.getItem() == i).mapToInt(ItemStack::getCount).sum();
return mc.player.inventory.mainInventory.stream().filter(itemStack -> itemStack.getItem() == i).mapToInt(ItemStack::getCount).sum() + mc.player.inventory.offHandInventory.stream().filter(itemStack -> itemStack.getItem() == i).mapToInt(ItemStack::getCount).sum();
}
public ArrayList<String> infoContents() {