remove debugging code & use inventory offset constant

This commit is contained in:
Matt Worzala 2021-01-02 06:51:21 -05:00
parent 1f60330abe
commit 0b9b95e6cb
No known key found for this signature in database
GPG Key ID: 046D16088BA8F7DD
2 changed files with 1 additions and 3 deletions

View File

@ -612,7 +612,7 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View
// Looping through player inventory
new InventoryClickLoopHandler(0, PlayerInventory.INVENTORY_SIZE - 9, 1,
PlayerInventoryUtils::convertToPacketSlot,
index -> playerInventory.getItemStack(index, 9),
index -> playerInventory.getItemStack(index, PlayerInventoryUtils.OFFSET),
(index, itemStack) -> playerInventory.setItemStack(index, 9, itemStack)));
if (clickResult == null)

View File

@ -49,7 +49,6 @@ public final class PlayerInventoryUtils {
case 8:
return BOOTS_SLOT;
}
System.out.println("ENTRY: " + slot + " | " + offset);
final int rowSize = 9;
slot -= offset;
if (slot >= rowSize * 3 && slot < rowSize * 4) {
@ -57,7 +56,6 @@ public final class PlayerInventoryUtils {
} else {
slot = slot + rowSize;
}
System.out.println("CONVERT: " + slot);
return slot;
}