mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 03:25:38 +00:00
Bookmarks: Fix Permutations with different amount (#1000)
This commit is contained in:
1 parent
5a533c8994
commit
c6170f9795
5 files changed
+104
-29
No files matched your search
@@ -879,6 +879,16 @@ public class BookmarkGrid extends ItemsGrid<BookmarksGridSlot, BookmarkGrid.Book
|
||||
return this.bookmarkItems.get(itemIndex);
|
||||
}
|
||||
|
||||
public void replaceBookmarkItem(int itemIndex, BookmarkItem newItem) {
|
||||
|
||||
if (itemIndex < 0 || itemIndex >= this.bookmarkItems.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.bookmarkItems.set(itemIndex, newItem);
|
||||
onItemsChanged();
|
||||
}
|
||||
|
||||
public int getAbsoluteSlotIndex(int itemIndex) {
|
||||
return this.gridGenerator.itemToSlot.getOrDefault(itemIndex, -1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user