AI Inventory Sorter
AI Inventory Sorter 是一款 Minecraft 模组,它利用人工智能自动整理你的物品栏。它会将物品放置在最优的格子中,确保你的快捷栏和主物品栏以高效的方式排列,从而优化游戏体验。
功能特性
-
快捷栏与主物品栏排序
根据严格的优先级顺序(武器、工具、护甲、实用物品和食物),自动将物品分配到最合适的快捷栏和物品栏格子中。
-
智能分区
- 左侧三分之一: 潜影盒和存储类物品
- 中间三分之一: 工具、武器、护甲、方块和其他杂物
- 右侧三分之一: 食物和消耗品
-
支持潜影盒识别
能够读取潜影盒内的内容以获取上下文信息,但始终会将盒子本身放置在指定的存储区域。
-
基于 AI 的 JSON 映射
使用 Ollama GPT-OSS 20B Cloud 模型生成槽位映射。
-
强大的解析能力
自动处理 AI 响应中的代码块标记(code fences)和多余文本,防止出现 JSON 解析错误。
依赖要求
- Minecraft 1.21.11
- Fabric Loader
- Fabric API
- Ollama API Key
安装步骤
- 将模组的
.jar 文件放入 mods/ 文件夹中。
- 在
config/aiinventorysort.json 中配置你的 Ollama API Key。
- 启动 Minecraft。
常见问题
Q: 我如何设置 Ollama API Key?
A: 将你的 API Key 添加到 config/aiinventorysort.json 文件中的 apiKey 字段下。
Q: 它支持模组添加的物品吗?
A: 是的。AI 会根据你定义的规则对长矛或自定义工具等模组物品进行分类。
Q: 如果 AI 生成了无效的 JSON 怎么办?
A: 模组会自动清理代码块标记并提取 JSON 数组,从而防止出现 MalformedJsonException(格式错误的 JSON 异常)。
Q: 我可以自定义槽位优先级吗?
A: 快捷栏和主物品栏的规则是内置的。高级用户可以修改源代码来更改优先级,但不推荐这样做。我希望很快能添加此功能。
Q: 为什么 AI 完成后我的物品栏没有任何变化?
A: 这是一个已知的 Bug。尝试在点击排序按钮后关闭物品栏窗口。
Q: 排序需要多长时间?
A: 对于满格的物品栏,可能需要长达 15-20 秒。对于少量物品的情况,大约需要 5-10 秒。
Q: 我的配置文件在哪里?
A: 如果没有配置文件,请在实例目录下的 /config 文件夹中创建一个文件(点击 Modrinth 页面中的文件夹按钮),将文件命名为 aiinventorysort.json 并粘贴以下内容:
{
"apiKey": "API_KEY_HERE",
"snapshotLayout": [],
"hotbarPins": {},
"showButtons": true
}
支持
如需提交 Bug 报告或功能请求,欢迎通过以下邮箱联系我: scdrichards2012@outlook.com
AI Inventory Sorter
AI Inventory Sorter is a Minecraft mod that automatically organizes your inventory using AI. It places items in the optimal slots, ensuring your hotbar and main inventory are efficiently arranged for gameplay.
Features
-
Hotbar & Main Inventory Sorting
Automatically assigns items to the most appropriate hotbar and inventory slots, following a strict priority order for weapons, tools, armor, utility items, and food.
-
Intelligent Sectioning
- Left Third: Shulker boxes and storage items
- Middle Third: Tools, weapons, armor, blocks, and miscellaneous items
- Right Third: Food and consumables
-
Shulker-Aware
Reads shulker box contents for context but always places the box in the designated storage section.
-
AI-Powered JSON Mapping
Uses Ollama GPT-OSS 20B Cloud model to generate slot mappings.
-
Robust Parsing
Automatically handles code fences and extraneous text in AI responses, preventing JSON parsing errors.
Requirements
- Minecraft 1.21.11
- Fabric Loader
- Fabric API
- Ollama API key
Installation
- Place the mod
.jar into your mods/ folder.
- Configure your Ollama API key in
config/aiinventorysort.json.
- Launch Minecraft.
FAQ
Q: How do I assign an Ollama API key?
A: Add your API key to config/aiinventorysort.json under apiKey.
Q: Does it support modded items?
A: Yes. The AI will classify modded items such as spears or custom tools according to your defined rules.
Q: What if the AI produces invalid JSON?
A: The mod automatically cleans code fences and extracts the JSON array, preventing MalformedJsonException.
Q: Can I customize slot priorities?
A: Hotbar and main inventory rules are built-in. Advanced users can modify the source code to change priorities, though this is not recommended. I do hope to add this feature soon.
Q: Why did nothing happen to my inventory after the AI finished?
A: This is a known bug. Try closing your inventory after clicking the sort button.
Q: How long should it take to sort?
A: With a full inventory, it might take up to 15-20 seconds. For a small inventory, you are looking at 5-10 seconds.
Q: Where is my config file?
A: If there is no config file, create a file at /config in your instance's directory (click the folder button in Modrinth), name the file aiinventorysort.json and paste this in:
{
"apiKey": "API_KEY_HERE",
"snapshotLayout": [],
"hotbarPins": {},
"showButtons": true
}
Support
For bug reports or feature requests, feel free to contact me at: scdrichards2012@outlook.com
评论 0
登录后参与评分
还没有评论,来抢沙发吧