Sophisticated Tab
一键访问你携带的所有 Sophisticated Backpacks —— 现已支持拖拽排序、右键隐藏以及每个世界的独立设置界面。 Sophisticated Tab 是一个小型的客户端兼容附加模组,为 Legendary Tabs 添加了用于 Sophisticated Backpacks 的导航标签页。每携带一个背包就会获得一个标签页。在主物品栏、副手和 Curios 背部槽位中携带多个背包时,每个背包都会对应一个标签页——每个标签页都会渲染实际的背包物品图标,让你一眼就能分辨它们;点击标签页即可打开对应的背包,并且你可以决定显示哪些标签页以及它们的排列顺序。
Minecraft 1.20.1 · Forge 47+ · Java 17 免费、开源,采用 MIT 许可证。
实际功能
该模组在现有的 Legendary Tabs 条带中添加了标签页:
- 每个背包对应一个标签页 —— 最多八个标签页会显示在你玩家物品栏的顶部,每个标签页对应你携带的一个背包。每个标签页都会渲染该背包真实的
ItemStack 图标(染色、重命名或升级后的背包外观各不相同),点击它会打开特定的那个背包,而不是默认打开排在最前面的背包。当某个槽位没有背包时,对应的标签页会从行中折叠消失。背包通过 Sophisticated Backpacks 自带的 PlayerInventoryProvider 进行识别,因此 Curios、装饰盔甲、主物品栏、副手以及胸甲槽位中的背包都会被自动识别。
- 当前活动标签高亮 —— 与你当前正在查看的背包相匹配的标签页会保持在悬停/深色状态,以便你清楚知道哪个背包是打开的。匹配逻辑基于每个背包 NBT 数据中存储的 UUID,因此在槽位移动、染色更改、重命名以及同等级别的背包之间都能保持稳定。
- 返回物品栏标签页 —— 出现在 Sophisticated Backpacks 界面的顶部。只需点击一次,即可回到你的玩家物品栏。再也不用反复关闭和重新打开。
- 拖拽排序 —— 左键按住任意背包标签页,然后水平拖动到新的位置。一个半透明的背包图标幽灵会跟随你的鼠标光标,一个小白色指示器标记放置位置。松开鼠标以确认。排序结果会在重启后保留。
- 右键上下文菜单 —— 右键点击任意背包标签页,会弹出一个小菜单,包含 打开背包、向左移动、向右移动 和 隐藏此背包 选项。隐藏操作会立即将该标签页从行中移除。
- 设置选项卡(齿轮图标) — 该行最右侧的选项卡会打开一个设置界面,列出你携带的所有背包,每个背包都配有可见性切换开关;此外还会显示该模组之前见过但当前不在你物品栏中的任何 UUID。底部按钮包括:重置顺序、重置隐藏状态、清理未使用项。还提供了一个按键绑定(选项 → 控制 → Sophisticated Tab → 打开选项卡设置,默认未绑定),允许你在游戏过程中直接打开此界面,无需先通过物品栏。
- 按世界、按服务器偏好设置 — 选项卡顺序和隐藏背包的状态会分别保存在单人世界(含局域网主机)和多玩家服务器的
config/sophisticatedtab/tab_preferences.json 文件中。背包身份由 NBT 中存储的内容 UUID 决定,因此即使重命名、染色、移动槽位,甚至将背包放入箱子并在数天后重新取出,你的选择依然有效。
选项卡外观是一个随此附加组件提供的自定义 52×22 PNG 图像,采用 Minecraft 风格的斜面按钮样式绘制,以便与 Legendary Tabs 条带自然融合。实际的背包物品通过原版物品渲染机制叠加在外观之上,因此资源包、自定义物品渲染器和着色处理程序均可正常工作,无需特殊处理。资源包作者可以通过覆盖 sophisticatedtab:textures/gui/backpack_tab.png 来自定义选项卡外观。齿轮图标的设置选项卡复用相同的外观,并叠加原版 comparator(比较器)物品作为其图标。
为什么需要它
如果你同时安装了 Legendary Tabs 和 Sophisticated Backpacks,但未安装此附加组件,背包不会生成对应的选项卡。Legendary Tabs 内置支持 Backpacked 和 Traveler's Backpack,但不支持 Sophisticated Backpacks。Sophisticated Tab 正好填补了这一空白。
此外,当你携带多个背包——不同等级、不同颜色、一个在 Curios 栏位、一个在主物品栏中——单一的通用选项卡无法区分它们。Sophisticated Tab 会为每个背包提供一个独立的选项卡,并在按钮上显示真实的背包物品图像,让你只需单击一次即可找到并打开正确的背包。
如果你携带了大量背包——用于采矿、食物、建筑、杂物或仅管理员使用的备用背包——选项卡条带可能会变得杂乱无章。拖拽排序、右键隐藏以及按世界保存的设置界面旨在确保选项卡行始终反映你的优先级,而不是 Sophisticated Backpacks 随机迭代出的顺序。被隐藏的背包永远不会被删除:它们仍保留在你的物品栏中,并可通过 Sophisticated Backpacks 的 B 键绑定继续打开。仅隐藏的是对应的选项卡。
如果您仅安装了 Sophisticated Backpacks,本模组不会添加任何内容——Sophisticated Backpacks 已自带创造模式选项卡及可配置的快捷键。本附加模组的作用在于像其他背包类模组一样接入 Legendary Tabs 的导航栏,并为您提供自定义管理该导航栏的控制选项。
截图
占位符——发布前请添加截图:
- 包含多个背包标签页的库存界面,顶部排列着各标签页,右侧为装备设置标签页。
- 拖拽中 — 一个正在被拖拽的标签页,跟随光标的半透明幽灵图标,以及两个相邻标签页之间的放置指示器。
- 在背包标签页上打开右键上下文菜单。
- 显示携带中的背包并带有可见/隐藏切换开关的设置界面。
依赖要求
上述上游模组均声明为硬性 mandatory=true 依赖。如果缺少其中任何一个,本模组将拒绝加载并显示清晰的错误信息,而不是在游戏启动时崩溃。
安装方法
- 为 1.20.1 安装 Minecraft Forge。
- 将以下 jar 文件放入你的
.minecraft/mods/ 文件夹:
legendarytabs-…jar
sophisticatedcore-…jar
sophisticatedbackpacks-…jar
sophisticatedtab-…jar(本模组)
- 启动游戏。打开你的库存界面 — 背包标签页位于顶部。
适用于单人游戏、局域网和专用服务器。本模组本身为仅客户端模组:专用服务器虽然接受该 jar 文件,但其中不包含任何服务端逻辑。实际用于“打开我的背包”的网络数据包由 Sophisticated Backpacks 提供。
模组兼容性
- Curios 和 Cosmetic Armor Reworked — 完全支持,因为背包查找功能使用了 Sophisticated Backpacks 自带的
PlayerInventoryProvider,而该接口已经集成了这两者。
- 其他 Legendary Tabs 标签页 — 和平共存。背包标签页使用优先级
20–27(每个物品栏槽位对应一个),与其他背包风格标签页(如 Backpacked、Traveler's Backpack)的惯例一致。返回库存标签页使用优先级 10。装备设置标签页使用优先级 100,因此它始终位于其他标签页的最右侧且不会发生冲突。
- 右键捕获 — 右键上下文菜单以高优先级拦截
ScreenEvent.MouseButtonPressed.Pre,并且仅当点击落在我们的背包标签页上时才取消该事件。其他 Legendary Tabs 标签页(来自其他插件)保持其默认点击行为 — 你在 Backpacked 或 Traveler's Backpack 标签页上的右键操作不受影响。
- 其他背包模组 — Sophisticated Tab 的作用范围仅限于 Sophisticated Backpacks。它不会触碰 Backpacked、Traveler's Backpack 或 Quark 的背包;Legendary Tabs 已为这些背包提供了独立的内置标签页。
- 资源包 — 背包物品图标继承自 Sophisticated Backpacks(或你的资源包)为每个背包定义的任何模型与纹理,因为标签页使用的是原版物品渲染机制。标签页边框本身位于
sophisticatedtab:textures/gui/backpack_tab.png,可被任何资源包覆盖。返回库存标签页仍复用 Legendary Tabs 的资源图集,因此遵循 LT 的资源包覆盖规则。
- 按键绑定类别 — 在选项 → 控制下添加一项:Sophisticated Tab → 打开标签页设置(默认未绑定)。开箱即用,不会与其他按键冲突。
整合包制作者须知
- 无需整合包侧配置。 没有需要分发或调整的 Forge TOML 配置文件。模组会在首次启动时自动创建
config/sophisticatedtab/tab_preferences.json,以持久化存储每位玩家在每个世界或服务器中的个人标签页顺序和隐藏背包状态。如果你删除了该文件(或者它意外损坏),模组会将坏文件重命名为 tab_preferences.json.broken.<时间戳> 并从零开始重建 — 玩家不会失去对背包的访问权限,仅丢失本地偏好设置状态。
- 无 Mixin、无访问转换器、无反射。 纯粹基于公共 API 集成,建立在 Legendary Tabs 和 Sophisticated Backpacks 之上。只要上游模组的公开钩子未被破坏,即可顺利应对补丁更新。唯一涉及跨模组字段访问的部分(LT 的公开字段
TabButton.tabBase)包裹在 try/catch 中 — 如果未来 LT 版本将该字段改为私有,拖拽功能和右键菜单会降级为记录警告日志,但设置界面仍可正常工作。
- Jar 包体积小。 约 64 KB。包含少量专注功能的类文件、一个语言文件和一张 PNG 图片。易于审计,易于分发。
- 客户端与服务端共用同一个 Jar。 在服务端加载时会正常运行但不执行任何操作 — 无网络代码、无注册逻辑、无状态管理。
@Mod 入口点仅在 Dist.CLIENT 环境下生效,因此仅客户端类不会在专用服务器上链接。
- 不新增服务端数据包。 打开背包仍然使用 Sophisticated Backpacks 自带的
BackpackOpenMessage。标签页顺序和隐藏状态永远不会离开客户端。
已知限制
- 八标签页上限。 该模组预先注册了八个背包标签页槽位。如果你同时携带超过八个可见的背包,第九个及之后的背包将不会获得标签页——它们仍可通过 Sophisticated Backpacks 默认的
B 键绑定打开。通过右键隐藏和设置界面正是为此场景设计:将你很少打开的背包隐藏起来,让那八个确实显示的标签页代表你实际使用的八个背包。
- 标签列表仅在屏幕打开时刷新。 如果你的物品栏界面已经打开,此时拾取一个新的背包,你将看不到它的标签页,直到关闭并重新打开物品栏。(Legendary Tabs 会在每次屏幕初始化时缓存其启用的标签页列表。)拖拽排序在同一屏幕打开期间会立即更新;隐藏和取消隐藏操作将在下次打开物品栏时生效。
- 无 UUID 的背包。从未打开过的背包可能会短暂缺少其 NBT 内容的 UUID。它们仍然会显示选项卡和真实图标,但在分配 UUID 之前无法被永久隐藏或重新排序(设置界面会用一个小
* 标记它们)。打开一次背包后,它们就会加入可配置的池子中。
- Sophisticated Backpacks 已经提供了一个快捷键(默认为
B),用于打开第一个可达的背包。本模组为那些不记忆快捷键的玩家提供了易于发现的、基于鼠标的对应功能——此外,它还允许你选择打开哪个背包、以何种顺序,以及隐藏哪些背包。
许可与链接
Sophisticated Tab
One-click access to every Sophisticated Backpack you're carrying — now with drag-to-reorder, right-click-to-hide, and a per-world settings screen. Sophisticated Tab is a small client-side compat addon that adds Legendary Tabs navigation tabs for Sophisticated Backpacks. Carry one backpack and get one tab. Carry several across your main inventory, offhand, and Curios back slot and get one tab each — every tab renders the actual backpack item so you can tell them apart at a glance, every tab opens its own backpack on click, and you decide which ones show up and in what order.
Minecraft 1.20.1 · Forge 47+ · Java 17 Free, open source, MIT licensed.
What it actually does
The mod adds tabs to the existing Legendary Tabs strip:
- One tab per backpack — up to eight tabs appear at the top of your player inventory, one for each backpack you're carrying. Each tab renders the real
ItemStack icon for that backpack (dyed, renamed, and upgraded backpacks look distinct) and clicking it opens that specific backpack, not whichever happens to be first. Tabs collapse out of the row when no backpack is in that pool slot. Backpacks are discovered through Sophisticated Backpacks' own PlayerInventoryProvider, so Curios, Cosmetic Armor, main inventory, offhand, and chest armor are all honored automatically.
- Active-tab highlight — the tab matching the backpack you're currently viewing stays in its hover/dark state so you can tell which one is open. Match uses each backpack's NBT-stored UUID, so it's stable across slot moves, dye changes, renames, and identical-tier backpacks.
- Return-to-inventory tab — appears at the top of the Sophisticated Backpack screen. One click, back to your player inventory. No more closing-and-reopening.
- Drag-to-reorder — left-click and hold any backpack tab, then drag it horizontally to a new slot. A faded ghost of the backpack icon follows your cursor and a small white indicator marks the drop position. Release to commit. Order persists across restarts.
- Right-click context menu — right-click any backpack tab for a small popup with Open Backpack, Move Left, Move Right, and Hide This Backpack. The hide action vanishes the tab from the row immediately.
- Settings tab (the gear) — the last tab on the row opens a settings screen listing every backpack you're carrying, each with a visibility toggle, plus any UUIDs the mod has previously seen that aren't in your inventory right now. Footer buttons: Reset Order, Reset Hidden, Clean Unused. There's also a key binding (Options → Controls → Sophisticated Tab → Open Tab Settings, default unbound) to open the screen from gameplay without going through the inventory first.
- Per-world, per-server preferences — tab order and hidden-backpack state are saved per single-player world (LAN-hosted included) and per multiplayer server in
config/sophisticatedtab/tab_preferences.json. Backpack identity is the contents UUID stored in NBT, so your choices survive renaming, dyeing, slot moves, even leaving the backpack in a chest and picking it up days later.
Tab chrome is a custom 52×22 PNG shipped with this addon, drawn in a Minecraft-style beveled-button look so it blends naturally with the rest of the Legendary Tabs strip. The real backpack item renders on top of the chrome via vanilla item rendering, so resource packs, custom item renderers, and tint handlers all work without any special handling. Resource-pack authors can restyle the tab chrome by overriding sophisticatedtab:textures/gui/backpack_tab.png. The gear settings tab reuses the same chrome with a vanilla comparator item overlaid as its glyph.
Why bother
If you have both Legendary Tabs and Sophisticated Backpacks installed without this addon, the backpack does not get a tab. Legendary Tabs has built-in support for Backpacked and Traveler's Backpack but not Sophisticated Backpacks. Sophisticated Tab fills exactly that gap.
And if you carry several backpacks — different tiers, different colors, one in Curios, one in your main inventory — a single generic tab can't tell you which is which. Sophisticated Tab gives you a tab for each, with the actual backpack item drawn on the button, so you can find and open the right one in a single click.
If you carry a lot of backpacks — mining, food, building, junk, admin-only spares — the tab strip can get noisy. The drag-to-reorder, right-click-to-hide, and per-world settings screen are there to keep the row reflecting your priorities, not whatever order Sophisticated Backpacks happens to iterate through. Hidden backpacks are never deleted: they stay in your inventory and remain openable via Sophisticated Backpacks' B keybind. Only the tab is suppressed.
If you only have Sophisticated Backpacks installed, this mod adds nothing — Sophisticated Backpacks already has a creative-mode tab and a configurable keybind. The point of this addon is to plug into Legendary Tabs' navigation strip the same way other backpack mods already do, and then give you the controls to curate it.
Screenshots
Placeholder — add screenshots before publishing:
- Inventory screen with several backpack tabs across the top, plus the gear settings tab on the right.
- Mid-drag — a tab being dragged, faded ghost icon following the cursor, drop indicator between two adjacent tabs.
- Right-click context menu open on a backpack tab.
- Settings screen showing carried backpacks with visible/hidden toggles.
Requirements
Both upstream mods are declared as hard mandatory=true dependencies. The mod will refuse to load with a clear error message if either is missing, rather than crash on startup.
Installation
- Install Minecraft Forge for 1.20.1.
- Drop the following jars into your
.minecraft/mods/ folder:
legendarytabs-…jar
sophisticatedcore-…jar
sophisticatedbackpacks-…jar
sophisticatedtab-…jar (this mod)
- Launch the game. Open your inventory — the backpack tab is at the top.
Works on single-player, LAN, and dedicated servers. The mod itself is client-only: the dedicated server accepts the jar but it has no server-side payload. The actual "open my backpack" packet is Sophisticated Backpacks'.
Mod compatibility
- Curios and Cosmetic Armor Reworked — fully supported because backpack lookup uses Sophisticated Backpacks' own
PlayerInventoryProvider, which already integrates with both.
- Other Legendary Tabs tabs — coexists peacefully. Backpack tabs use priorities
20–27 (one per pool slot), matching the convention of other backpack-style tabs (Backpacked, Traveler's Backpack). The return-to-inventory tab uses priority 10. The gear settings tab uses priority 100 so it always sits to the right of other tabs without colliding.
- Right-click capture — the right-click context menu intercepts
ScreenEvent.MouseButtonPressed.Pre at high priority and cancels it only when the click lands on one of our backpack tabs. Other Legendary Tabs tabs (from other addons) keep their default click behavior — your right-click on a Backpacked or Traveler's Backpack tab is not affected.
- Other backpack mods — Sophisticated Tab is scoped exclusively to Sophisticated Backpacks. It does not touch Backpacked, Traveler's Backpack, or Quark backpacks; Legendary Tabs has separate built-in tabs for those.
- Resource packs — backpack item icons inherit from whatever model + texture Sophisticated Backpacks (or your pack) defines for each backpack, because the tab uses vanilla item rendering. The tab chrome itself is
sophisticatedtab:textures/gui/backpack_tab.png and can be overridden by any resource pack. The return-to-inventory tab still reuses Legendary Tabs' atlas, so it follows LT's resource pack overrides.
- Key binding category — adds one entry under Options → Controls: Sophisticated Tab → Open Tab Settings (default unbound). Won't collide with anything out of the box.
For modpack makers
- No modpack-side config. There is no Forge TOML config to ship or tune. The mod auto-creates
config/sophisticatedtab/tab_preferences.json on first launch to persist each player's own tab order and hidden-backpack state per world or server. If you delete the file (or if it ever ends up corrupt), the mod renames the bad file to tab_preferences.json.broken.<timestamp> and starts fresh — players won't lose access to their backpacks, only the local preference state.
- No mixins, no access transformers, no reflection. Pure public-API integration on top of Legendary Tabs and Sophisticated Backpacks. Survives upstream patch updates that don't break the public hooks. The one piece of cross-mod field access (LT's public
TabButton.tabBase) is wrapped in a try/catch — if a future LT release ever flips that field private, drag-and-drop and the right-click menu degrade to a logged warning while the settings screen still works.
- Small jar. ~64 KB. A small set of focused classes, one lang file, one PNG. Trivial to audit, trivial to ship.
- Same jar on client and server. Server-side it loads cleanly and does nothing — no network code, no registration, no state. The
@Mod entrypoint short-circuits on anything but Dist.CLIENT, so client-only classes never link on a dedicated server.
- No new server packets. Opening a backpack still uses Sophisticated Backpacks' own
BackpackOpenMessage. Tab order and hidden state never leave the client.
Known caveats
- Eight-tab cap. The mod pre-registers a pool of eight backpack tab slots. If you carry more than eight visible backpacks at once, the 9th and onward won't get a tab — they're still openable via Sophisticated Backpacks' default
B keybind. The hide-via-right-click and the settings screen are there for exactly this case: tuck away the backpacks you rarely open so the eight tabs that do show represent the eight you actually use.
- Tab list only refreshes when the screen opens. If you pick up a new backpack while your inventory screen is already open, you won't see its tab until you close and reopen the inventory. (Legendary Tabs caches its enabled-tab list per screen init.) Drag-reorder updates immediately within the same open screen; hide and unhide apply on the next inventory open.
- UUID-less backpacks. Backpacks that have never been opened may briefly lack their NBT contents UUID. Those still get a tab and a real icon, but they can't be persistently hidden or reordered until the UUID is assigned (the settings screen marks them with a small
*). Open the backpack once and they'll join the configurable pool.
- Sophisticated Backpacks already provides a hotkey (default
B) that opens the first reachable backpack. This mod is the discoverable, mouse-driven counterpart for players who don't memorize hotkeys — plus it lets you choose which backpack you open, in which order, with which ones hidden.
License & links
评论 0
登录后参与评分
还没有评论,来抢沙发吧