Skip to content

Commit

Permalink
[minor] fixed bookmarks being set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nilau1998 committed Aug 5, 2023
1 parent 41414f1 commit b6796a1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
public class DefaultBookmarkContainerHandler implements IBookmarkContainerHandler {

@Override
public void pullBookmarkItemsFromContainer(GuiContainer guiContainer, ArrayList<ItemStack> realItems) {
public void pullBookmarkItemsFromContainer(GuiContainer guiContainer, ArrayList<ItemStack> bookmarkItems) {
FastTransferManager manager = new FastTransferManager();
LinkedList<ItemStack> containerStacks = manager.saveContainer(guiContainer.inventorySlots);

for (ItemStack bookmarkItem : realItems) {
for (ItemStack bookmarkItem : bookmarkItems) {

int bookmarkSizeBackup = bookmarkItem.stackSize;

for (int i = 0; i < containerStacks.size() - 4 * 9; i++) { // Last 36 slots are player inventory
ItemStack containerItem = containerStacks.get(i);
Expand All @@ -39,6 +41,7 @@ public void pullBookmarkItemsFromContainer(GuiContainer guiContainer, ArrayList<
}
}
}
bookmarkItem.stackSize = bookmarkSizeBackup;
}
}
}

0 comments on commit b6796a1

Please sign in to comment.