mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-27 02:21:38 +01:00
remove debugging code & use inventory offset constant
This commit is contained in:
parent
1f60330abe
commit
0b9b95e6cb
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user