Merge pull request #538 from S-B99/feature/pvpinfo#520

fix not searching if items were in offhand <3
This commit is contained in:
Bella Who 2020-03-06 21:45:58 +00:00 committed by GitHub
commit 412fc60112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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() {