
Ai Inventory Sorter
Adds a small button that lets you use AI to sort your inventory.
Screenshots

About this Mod
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
.jarinto yourmods/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: [email protected]
Available Versions
How to Install Ai Inventory Sorter on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).
Install Mod
Open the mod browser in the dashboard and search for "Ai Inventory Sorter". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.11
Server-side
✗ UnsupportedRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Ai Inventory Sorter server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.
Is Ai Inventory Sorter compatible with fabric?
Ai Inventory Sorter officially supports fabric for Minecraft 1.21.11. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Ai Inventory Sorter – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Ai Inventory Sorter consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Ai Inventory Sorter with just one click on your server.