How to correctly check other players' inventory?
-
I used this code in my Client(mcp937, Java) to check how many Totems your competitor have:
String totems = String.format("Totem: %d", target.inventoryContainer.inventorySlots.stream().filter(slot -> slot.getStack().getItem() == Items.field_190929_cY/*Totem*/).mapToInt(slot -> slot.getStack().stackSize).sum());
but when I play in server, it seems that can only count my target's off hand. how can I fix it?
-
idk
i only do script for lb 1.8.9
because lb 1.12 not update,a lot bug,..etc -
@Temm Thanks for explaining that!
-
This post is deleted!
-
@ender1355 who asked?
-
@czechhek check the tags of this: https://namemc.com/skin/b6df60aa1357b37d
-
@ender1355 who asked 2?