Sophisticated Sorter
Sophisticated Sorter 扩展了 Sophisticated 系列自带的容器排序(及相关)功能,使其能够作用于玩家物品栏以及所有可用的容器。
主要功能
排序按钮扩展
该模组将 Sophisticated Core 的排序按钮添加到了大多数常规容器界面中。“扩展”在此处指的是将 Sophisticated Core 的排序入口引入到 Sophisticated 系列之外的更多容器中,而不是添加一套完全不同的第二套排序逻辑。排序仍然使用 Sophisticated Core 的四种类别:按名称、按模组、按数量以及按标签,默认模式为按名称。
其中一个按钮执行排序,另一个按钮切换排序模式。已经熟悉 Sophisticated 系列排序方式的老玩家无需重新学习任何操作。
玩家物品栏排序
该模组可以对玩家自身的物品栏进行排序。当当前界面不符合“排序容器本身”的条件时,模组会改为排序玩家的物品栏。因此,即使在工作台、熔炉或配方类界面中,你依然可以快速整理角色身上的物品。
当当前界面符合排序条件时,模组会对容器本身进行排序。这样,普通容器(如箱子和木桶)就能获得与 Sophisticated 系列相同的排序体验。
即使在不显示排序按钮的界面中,你仍然可以通过快捷键(默认:R)进行排序。快捷键和按钮共享相同的目标逻辑:如果当前界面适合对容器进行排序,则排序容器;否则,排序玩家物品栏。
搜索与快速转移
非常常见的功能;无需多言。
容器过滤规则
是否对当前容器进行排序由两个过滤器控制:
Filter1(默认启用):启用时,只有拥有超过46个槽位的界面才会被视为可排序的容器;否则,排序将回退到玩家物品栏。可以将 46 理解为玩家的 36 个物品栏槽位加上一个小容器的 10 个槽位。因此,槽位较少的界面(如工作台或小工具界面)默认不会对其自身容器进行排序。Filter2(默认启用):启用时,如果当前界面包含任何明显不适合排序的槽位,则该界面不会被视作可排序的容器。最典型的例子是特殊槽位,例如合成结果槽。此过滤器的存在是为了防止功能性界面意外地对这些特殊槽位进行排序。
在常规容器界面中,仅当满足当前过滤器条件(且未被列入黑名单)时,才会显示排序按钮。不适合对容器进行排序的界面通常会隐藏这些按钮,但此时快捷键仍可对玩家物品栏进行排序。
按钮布局
可以通过右键拖拽来重新定位按钮,并通过快捷键(默认:U)切换其显示/隐藏状态。
按钮布局按容器类型隔离:移动箱子内的按钮不会影响木桶中的按钮位置。
容器设置
- 忽略排序:标记一个槽位范围;该范围内的槽位永远不会被排序。
- 槽位记忆:为容器中的特定槽位分配固定物品——其他物品无法放置在该槽位,且在排序时,匹配的物品会优先放入该槽位。
Sophisticated Sorter
Sophisticated Sorter extends the container sorting (and related) features that come with the Sophisticated series so they work on the player inventory and on every usable container.
Main Features
Sort Button Extension
The mod adds Sophisticated Core's sort buttons to most regular container screens. "Extension" here means bringing the Sophisticated Core sorting entry point to more containers outside the Sophisticated series, not adding a second, completely different sorting logic. Sorting still uses Sophisticated Core's four sorting modes: by name, by mod, by count and by tags, with by name as the default mode.
One button performs the sort, the other cycles the sort mode. Players already used to the Sophisticated series' sorting should not need to relearn anything.
Player Inventory Sorting
The mod can sort the player's own inventory. When the current screen does not qualify as "sort the container itself", the mod sorts the player inventory instead. So even on crafting tables, furnaces or recipe-type screens you can still quickly sort the items on your character.
When the current screen does qualify, the mod sorts the container itself rather than the player inventory. This way ordinary containers such as chests and barrels get the same sorting experience as the Sophisticated series.
Even on screens that do not display the sort buttons, you can still sort with the hotkey (default: R).
The hotkey and the buttons share the same target logic: if the current screen suits sorting the
container, it sorts the container; otherwise it sorts the player inventory.
Search & Quick Transfer
Very common functionality; not much to say.
Container Filter Rules
Whether the current container is sorted is controlled by two filters:
Filter1(enabled by default): when enabled, only screens with more than46slots are treated as a sortable container; otherwise sorting falls back to the player inventory. 46 can be read as the player's 36 inventory slots plus 10 for a small container. Screens with few slots, such as crafting tables or small utility screens, therefore do not sort the container itself by default.Filter2(enabled by default): when enabled, if the current screen contains any slots that are clearly unsuitable for sorting, the screen is not treated as a sortable container. The most typical example is special slots such as crafting result slots. This filter exists to keep functional screens from accidentally sorting special slots.
On a regular container screen the sort buttons only appear when it satisfies the current filters (and is not blacklisted). Screens that are not suited for sorting the container usually hide the buttons, but the hotkey still sorts the player inventory there.
Button Layout
Buttons can be repositioned by right-click-dragging them, and toggled hidden/shown with the hotkey
(default: U).
Button layout is isolated per container type: moving the buttons inside a chest does not affect barrels.
Container Settings
- Ignore sorting: mark a slot range; slots inside that range are never sorted.
- Slot memory: assign a fixed item to a specific slot in a container — no other item can be placed there, and when sorting, the matching item is placed into that slot first.
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
下载 Sophisticated Sorter
修复了物品丢失报告以及模组在不应激活时激活的问题。
- 当缺少 Sophisticated Core 前置模组时,失败提示更加清晰。 每个入口点现在会在接触任何引用 Core 的类之前探测 Core 是否存在,如果不存在则中止并显示明确提及
sophisticatedcore的错误消息,而不是在类初始化过程中因裸NoClassDefFoundError而崩溃(某些启动器仅将其显示为通用的“模组加载失败”,且无法提供可用原因)。所有目标版本均已在其模组元数据中声明了 Core 依赖,因此正常的加载器仍会首先阻止启动。文档(README / docs)现在也明确说明了这一前置要求。 - Fabric:修复了在排序多个最大堆叠数为 1 的相同物品时的物品丢失问题(有用户报告铁斧头/铁护腿/石镐:整整一箱此类物品被合并成了单个物品)。负责将每个槽位的堆叠上限限制为物品自身上限的
InventorySortermixin 在其注入目标中嵌入了一个原版类型,但编译时使用了remap = false。Fabric 生产运行时使用中间名称(如class_1799),因此该注入器在 Fabric 环境中从未被找到:排序器继续使用容器默认的每槽位 64 个物品的上限,例如将五个斧头合并为一个“5 个物品的堆叠”,而在写回时容器将其截断为 1 个 ¡ª 其余物品被销毁。现在注入器目标已启用重映射(@At(remap = true),同时保持 Core 方法本身不进行重映射),并且构建生成的 refmap 将ItemStack映射到class_1799,从而确保钩子能正确生效。Forge/NeoForge 保留官方类名,因此未受影响。 - 排序结果在写回前会经过验证。 除了现有的“无物品丢失”检查(每项物品的总数保持不变)外,任何结果堆叠不得超过输入中对该物品合法允许的数量;如果堆叠过大(即上述损坏情况,容器原本会将其截断),则排序将保留原始物品而不进行更改。合法的、预先存在的超大堆叠仍会通过验证。
- 新增配置项
transferMainInventoryFirst(默认值为true)。 当将容器物品转移至玩家背包时,模组现在会先填满 27 格的主物品栏,再填充 9 格的快捷栏,这与 Sophisticated Core 自身的转移逻辑一致。若设置为false,则恢复旧的 vanilla 快速移动顺序(优先填充快捷栏)。此选择会随转移请求一同传递,以确保客户端和服务器达成一致。适用于所有目标平台。 - 整个模组在 Sophisticated Backpacks / Sophisticated Storage 界面中现在处于非活动状态。 这些界面拥有自己的排序/转移处理逻辑(包括无需排序的“忽略”槽位和记忆槽位),因此排序器不再从任何入口点对它们触发自身的排序操作:
- 它们的主界面继承自 Core 的
StorageScreenBase,设置界面继承自SettingsScreen;所有客户端入口点(排序快捷键、排序/转移按钮、设置齿轮、禁用开关、槽位高亮装饰以及搜索框的提示工具提示)现在在这两种界面中均会提前退出。 - 服务端防护:
CoreUtils.executeSort/executeTransfer会跳过任何打开的StorageContainerMenuBase/SettingsContainerMenu,因此即使是不匹配或第三方的客户端也无法让排序器触及 Sophisticated 容器。
- 它们的主界面继承自 Core 的
- 修复了在排序高堆叠物品库存时发生的物品丢失(“吞噬”物品)问题。 通用排序会将堆叠通过 Core 的
InventorySorter进行处理,后者将物品放回 vanilla 的每槽位 64 个物品的上限处;对于来自堆叠升级的高堆叠物品,则需要更多槽位,而当槽位不足时,Core 会静默丢弃溢出的部分。现在会对排序结果与排序前获取的每项物品总数进行比对,如果会导致任何物品丢失,则丢弃此次排序结果,从而确保排序永远不会销毁物品。适用于共享后端及 26.1 适配器。 - 修复了在 Sophisticated 界面上排序/禁用快捷键完全无效的问题,此前这些快捷键的行为类似于“对玩家物品栏进行排序”。
注意:上述两条内容以及本版本的开头两项内容是针对“排序会吞噬物品 / 仅剩一个物品”报告的修复。其根本原因各不相同:
- 仅限 Fabric ¡ª 一个 mixin 在生产环境中丢失了其混淆映射,导致最大堆叠数为 1 的物品被合并为一个无效堆叠并被截断(铁斧头/护腿/镐头全部减少为一个)。
- 所有目标平台 ¡ª 通用排序无法表示高堆叠物品(堆叠升级)或需要比空闲槽位更多的物品,且溢出部分被丢弃。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧