Utils ported

This commit is contained in:
Sebastian Hartte
2020-06-28 03:41:44 +02:00
parent 7c28a71e10
commit fee5b7fdfc
204 changed files with 1371 additions and 1737 deletions
@@ -117,9 +117,9 @@ public final class ContainerLocator {
if (is.isEmpty()) {
throw new IllegalArgumentException("Cannot open an item-inventory with empty hands");
}
int invSize = player.inventory.getSizeInventory();
int invSize = player.inventory.size();
for (int i = 0; i < invSize; i++) {
if (player.inventory.getStackInSlot(i) == is) {
if (player.inventory.getStack(i) == is) {
return i;
}
}