Minecraft-Backpack-Mod
14 merged pull requests.
New Features
- #36 Extended ContainerAdvanced and ItemBackpackBase with NoHotBarNeed compatibility logic, added helper method in GuiHelper to detect item slot changes. - @Erixonich
- Added: NoHotBarNeed mod integration, slot change detection logic, UI persistence on backpack slot shift
- #33 Extracted hardcoded button letters to localizable strings in FactoryWorkbenchBackpack and Localizations. - @Ranzuu
- Added: localized button letter entries
- #30 Implemented GuiInventoryTabHandler and inventory tab classes (AbstractInventoryTab, InventoryTabBackpack, InventoryTabVanilla) with TabRegistry integration for multi-mod compatibility. - @Eldrinn-Elantey
- Added: InventoryTabBackpack tab for backpack access, InventoryTabVanilla return tab, AbstractInventoryTab base class, GuiInventoryTabHandler event listener, GuiHelper tab positioning utilities, tab state sync on world join, LibIPN dependency
- #26 Added getTier() utility method to BackpackUtil, integrated dynamic slot calculation and tooltip line generation in ItemBackpackBase with localizable strings. - @Eldrinn-Elantey
- Added: dynamic tooltip generation for backpacks, getTier() utility method, tier and slot display in tooltips, shift-key detail display, localization entries for tooltip strings
- Fixed: TODO for BackpackUtil.getTier()
- #25 Extended backpack factories (FactoryBackpackNormal, FactoryPersonalSlot, FactoryWorkbenchBackpack) and GuiSlot to support color and slot configuration options via Localizations. - @Ranzuu
- Added: backpack title color customization, inventory slot customization, hotbar slot customization, new localization entries
Changes
- #19 BackpackSave.getSlotsPerRow: threshold changed from size < 64 to size <= 63, adds a loop from 7 down to 3 rows looking for an exact divisor with columns in 9..19, then falls back to the old column search. Constants are final. - @koolkrafter5
- Added: rectangular layout search for large backpacks
Bug Fixes
- #38 GuiHelper.displayBackpack checks isOpenedByOtherPlayer and refuses to open with a new lang message. MessageOpenGui only sets the personal backpack open flag if the container actually opened. BackpackUtil.pickupItem skips pickup while another player has that UUID open. - @Eldrinn-Elantey
- Added: chat message when a backpack is already open by another player
- Fixed: item duplication from two players opening backpacks with the same UUID
- #37 Modified ItemBackpackBase and MessageOpenGui to call prepare() and flush containers before building BackpackSave, ensuring stale inventory data is not reloaded when reopening backpacks. - @Luca-Guettinger
- Fixed: item duplication by reading stale pre-close backpack contents
- Closes Dupes-Exploits-GTNH#256
- #35 SaveFileHandler caches files with version tracking and queues dirty ones on ThreadedFileIOBase via IThreadedFileIO, with .dat_old and .dat_new fallbacks on load. EventHandlerBackpack adds a WorldEvent.Save handler for dimension 0 that calls queueDirtyFiles. Methods are synchronized. - @Algent
- Added: deferred backpack writes on world save
- Removed: synchronous write on every backpack change
- Fixed: backpack files out of sync with world save
- #34 SaveFileHandler validates file names as UUIDs, BackpackSave re-initializes when stored type or size differs from the item, and ContainerPersonalSlot now calls super.onContainerClosed. MessageRecipe, MessageBackpackInfoRequest and MessagePersonalBackpack validate sender and content, container slot clicks and InvTweaks section creation get bounds checks, and NEI is bumped to 2.8.109-GTNH. - @Algent
- Fixed: Crash with IndexOutOfBoundsException when opening a backpack on a dedicated server, Backpacks with invalid metadata, Backpacks disappearing when closed, Client-supplied stacks from NEI recipe packets written into server inventory slots
- Closes GTNH#25616
- #29 BackpackUtil.pickupItem returns early when isPersonalBackpackOpen matches the player's open ContainerAdvanced. ContainerAdvanced gained a getBackpackSave accessor. - @Worive
- Fixed: item deleted after dropping from a backpack with the filter still on
- Closes GTNH#24027
- #24 Moved setFocused(true) for the name Textbox from the GuiBackpackRename constructor to initGui. - @ModularityEnjoyer
- Fixed: cannot type in backpack rename field
- Closes GTNH#23109
- #16 Added MessageBackpackInfoRequest (id 5, server) and MessageBackpackInfo (id 13, client) plus a client-side BackpackUsageCache with a 60 s expiry and 1 s request throttle. ItemBackpackBase.addInformation uses the cache, and ContainerAdvanced.onContainerClosed invalidates the entry through the proxy. - @Worive
- Added: backpack slot usage request and response packets, client-side slot usage cache
- Fixed: backpack tooltip always showing 0/0 slots used, crash when closing a backpack
- Closes GTNH#20998, GTNH#21700
Performance
- #23 Refactored rendering code in ContainerWindow, Window, Button, GuiSlot, Icon, Rectangle, and RenderHelper to batch Tessellator operations and reduce draw call frequency. - @gaogao-qwq
- Fixed: excessive Tessellator draw calls causing frame rate drops
Contributors
Everyone who authored, reviewed or co-authored a change on this page, with how many of them:
@Algent (3), @Eldrinn-Elantey (3), @Ranzuu (3), @sisyphussy (3), @UltraProdigy (3), @Dream-Master (2), @Luca-Guettinger (2), @Worive (2), @Alexdoru (1), @AnsonYeung (1), @boubou19 (1), @Caedis (1), @Erixonich (1), @gaogao-qwq (1), @Guvante (1), @jordanamr (1), @koolkrafter5 (1), @mitchej123 (1), @ModularityEnjoyer (1), @PLASMAchicken (1), @tiffit (1), @TimeConqueror (1)