File Details
Sophisticated Tab 0.1.0 (Forge 1.20.1)
- R
- May 11, 2026
- 12.84 KB
- 19
- 1.20.1
- Forge
File Name
sophisticatedtab-0.1.0.jar
Supported Versions
- 1.20.1
Curse Maven Snippet
[1.20.1-0.1.0] - 2026-05-10
Initial release. A client-only compat addon bridging Legendary Tabs and Sophisticated Backpacks on Forge 1.20.1.
Added — Legendary Tabs integration
Backpack tab on the player inventory (SophisticatedBackpacksTab.java) — extends
sfiomn.legendarytabs.api.tabs_menu.TabBase. Attaches to bothnet.minecraft.client.gui.screens.inventory.InventoryScreenandnet.p3pp3rf1y.sophisticatedbackpacks.client.gui.BackpackScreenviaTabsMenu.addTabToScreen(...). Priority20, matching the Legendary Tabs convention used byBackpackedTabandTravelersBackpackTab. Click forwards toSBPPacketHandler.INSTANCE.sendToServer(new BackpackOpenMessage())— the same server-side workflow Sophisticated Backpacks uses for its own keybind, so no custom networking is registered. The tab disables itself when the player has no reachable backpack.Return-to-inventory tab on the backpack screen (BackToInventoryTab.java) — separate
TabBasesubclass attached only toBackpackScreen.class. Necessary because Legendary Tabs' built-inInventoryTab.initTabOnScreens()has a hard-coded screen allowlist that includes Backpacked and Traveler's Backpack but not Sophisticated Backpacks. Priority10so it renders to the left of the backpack tab. Opens a freshInventoryScreen(player)directly viaMinecraft.getInstance().setScreen(...)(no network round-trip needed for a vanilla screen).Backpack discovery (SophisticatedBackpacksLocator.java) — wraps Sophisticated Backpacks' own
PlayerInventoryProvider.get().runOnBackpacks(player, callback)and exposesfindFirstBackpack(Player)andhasOpenableBackpack(Player). Reusing the upstream provider means the tab honors every inventory handler Sophisticated Backpacks itself supports (main, offhand, Curios, Cosmetic Armor) without our addon caring which mods are installed.Dynamic backpack-screen sizing (SophisticatedBackpacksSizing.java) — mirrors the width/height math from
net.p3pp3rf1y.sophisticatedcore.client.gui.StorageScreenBase. ConstantsHEIGHT_WITHOUT_STORAGE_SLOTS=114,SLOT_SIZE=18,BASE_WIDTH_PADDING=14,SCROLLBAR_WIDTH_DELTA=6. Selects 9-vs-12-column layout from(totalSlots + columnsTaken * totalRows) <= 81, accounts for upgrade columns, clamps row count by the viewport viaMinecraft.getInstance().getWindow().getGuiScaledHeight(). Falls back to vanilla176×166when no backpack is reachable so the tab stays aligned on a plainInventoryScreen.
Added — Mod scaffolding
@Modentrypoint gated toDist.CLIENT(SophisticatedTab.java). Dedicated servers accept the jar but the client setup listener is never registered, so no client-only classes load.- Client bootstrap with belt-and-braces
ModList.get().isLoaded(...)checks for both upstream mods plusFMLClientSetupEvent.enqueueWork(...)to dodge parallel mod loading hazards. - Compat-class isolation — every reference to
sfiomn.legendarytabs.*andnet.p3pp3rf1y.*lives underclient/compat/legendarytabs/. The entrypoint and bootstrap classes never touch optional symbols, so a missing dependency cannot trigger aNoClassDefFoundErrorat startup. - Resources:
META-INF/mods.tomldeclares both upstream mods asmandatory=trueside="CLIENT"dependencies withordering="AFTER".pack.mcmetashipspack_format: 15.en_us.jsoncarries two tooltip keys (tooltip.sophisticatedtab.tab.sophisticatedbackpacksandtooltip.sophisticatedtab.tab.inventory). No textures shipped — both tabs blit from Legendary Tabs' owntab_menu_buttons.pngatlas.
Added — Build
- Composite-build-first dependency strategy (settings.gradle) —
includeBuild('../LegendaryTabs')andincludeBuild('../SophisticatedBackpacks')fire automatically when sibling clones exist. When they don't, the build falls back to CurseMaven coordinates pinned in gradle.properties (LegendaryTabs1172469:6079304, Sophisticated Backpacks422301:7414216, Sophisticated Core618298:7455151). Both paths produce deobf jars; no manual setup required either way. - ForgeGradle
[6.0.24,6.2)targeting Minecraft1.20.1+ Forge47.4.20, official mappings. - Sophisticated Core on the compile classpath — required because
IBackpackWrapper extends IStorageWrapper,SBPPacketHandler extends PacketHandler, andBackpackScreen extends StorageScreenBase, all of which are defined in Core. Without Core oncompileOnly, the compiler can't follow the inheritance chain. - Reobfuscation runs as part of
gradlew build. Final jar is ~13 KB.
Design notes for future contributors
addTabToScreen's last argument ispriority, not a Y offset. The design document we worked from misnamed it. Legendary Tabs computes tab position from eachAbstractContainerScreen'sgetGuiLeft()/getGuiTop()per frame inClientForgeEvents.preRenderScreen— there's no Y offset to set. Priority10shows first,20shows after, etc.- The hover stride in
tab_menu_buttons.pngis+54pixels, not+26. The atlas pairs each tab's normal and hover variants with 54-pixel column spacing. The backpack sprite lives at(27, 46), the inventory sprite at(0, 0). Drop these into a newTabBasesubclass and reuse them verbatim; matches the conventions inBackpackedTab,TravelersBackpackTab, andInventoryTabupstream. - The width/height suppliers run every frame via Legendary Tabs'
ScreenEvent.Render.Prelistener. They're cheap by design —SophisticatedBackpacksSizingreads the cachedIBackpackWrapperdirectly without any allocation per frame.