add inventory access to gui getitem

This commit is contained in:
jascotty2 2019-09-02 13:35:52 -05:00
parent 4b68c6726a
commit 796a24e7e9

View File

@ -221,11 +221,17 @@ public class Gui {
}
public ItemStack getItem(int cell) {
if (inventory != null && unlockedCells.getOrDefault(cell, false)) {
return inventory.getItem(cell);
}
return cellItems.get(cell);
}
public ItemStack getItem(int row, int col) {
final int cell = col + row * 9;
if (inventory != null && unlockedCells.getOrDefault(cell, false)) {
return inventory.getItem(cell);
}
return cellItems.get(cell);
}