Dupe Fix - Make bag logic more lag resistant (#121)

This commit is contained in:
Algent authored and GitHub committed 2026-07-04 18:57:41 +00:00
1 parent 4b364a93db
commit db25dcce48
5 files changed
+14 -5

No files matched your search

@@ -28,6 +28,11 @@ public class ItemInventoryBackpackPaged extends ItemInventoryBackpack implements
@Override
public void flipPage(EntityPlayer player, short page) {
GuiHandler.openGui(player, backpackNaturalist, page);
ItemLocation loc = getLocation();
if (loc.type() == ItemLocation.Type.PLAYER_INVENTORY) {
GuiHandler.openGui(player, backpackNaturalist, page, loc.slotIdx());
} else {
GuiHandler.openGui(player, backpackNaturalist, page);
}
}
}
@@ -72,7 +72,7 @@ public class ItemBackpack extends ItemWithGui implements ActivatableFromInventor
@Override
protected void openGui(EntityPlayer entityplayer) {
GuiHandler.openGui(entityplayer, this, (short) type.ordinal());
GuiHandler.openGui(entityplayer, this, (short) type.ordinal(), entityplayer.inventory.currentItem);
}
@Override
@@ -34,7 +34,7 @@ public class ItemBackpackNaturalist extends ItemBackpack {
@Override
protected void openGui(EntityPlayer entityplayer) {
GuiHandler.openGui(entityplayer, this);
GuiHandler.openGui(entityplayer, this, (short) 0, entityplayer.inventory.currentItem);
}
@Override