Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details
Smart Inventory Sorter automatically organizes inventories in Minecraft. It sorts storage containers when players finish using them, sorts player inventories on close, merges partial stacks before sorting, and can run server-side only, in singleplayer, or with optional client controls. The client mod is never required: vanilla clients get full automatic sorting and commands when the mod is installed on the server.
What the mod does
- Sorts chests, double chests, ender chests, barrels, shulker boxes, hoppers, droppers, dispensers, and compatible storage menus when the player closes them (exact per-container toggles depend on version, see Configuration).
- Sorts the player inventory after it closes, with separate toggles for main inventory, hotbar, armor, and offhand sections (26.3 build; older builds sort the main inventory with hotbar lock).
- Merges compatible partial stacks before sorting to free up slots.
- Never touches specialized menus such as crafting tables, furnaces, blast furnaces, smokers, brewing stands, anvils, smithing tables, stonecutters, or enchanting tables.
- Adds an optional compact S button in supported container screens, an optional P keybind, and chat commands for manual sorting.
- Manual-only mode disables every automatic sort so nothing moves unless you press S, press P, or run a sort command.
- Per-item filtering lets you exclude specific items from sorting or restrict sorting to a specific item list using item IDs such as minecraft:elytra (26.3 build).
Supported versions
| Minecraft | Java | Modrinth version | File |
|---|---|---|---|
| 1.21 to 1.21.11 | 21 | 1.1.0 | smart-inventory-sorter-1.0.0-mc1.21-1.21.11.jar |
| 26.1 to 26.1.2 | 25 | 1.1.0 | smart-inventory-sorter-1.0.0-mc26.1-26.1.2.jar |
| 26.2 | 25 | 1.1.0 | smart-inventory-sorter-1.0.0.jar |
| 26.3 | 25 | 1.1.0 | smart-inventory-sorter-1.0.0-mc26.3.jar |
Older 1.0.0 files are kept for reference. Use 1.1.0 for the latest fixes and options.
Installation
Server-side only (recommended for servers):
- Install Fabric Loader and Fabric API matching your Minecraft version.
- Place the matching JAR from the table above into the server mods folder.
- Restart the server. Vanilla clients can join with no client mod installed.
Singleplayer:
- Install Fabric Loader and Fabric API in your client instance.
- Place the matching JAR into the mods folder and launch the game.
Optional client features:
- Install the same JAR on the client to enable the S button and the P keybind.
- Set rawMode to true to hide both, or use showSortButton and enableKeybind independently (26.3 build).
- The client is never required. Automatic sorting and sort commands work for vanilla clients when the mod runs on the server.
How to use
- Automatic mode: open a supported container, move items normally, then close it. The server consolidates stacks and sorts the contents. Open and close your inventory to sort the enabled inventory parts.
- Button-only mode: set manualSortingOnly to true and reload with /sort reload (26.3) or restart. Nothing sorts on close anymore. Sort exactly when you want with the S button, the P key, or a sort command.
- The S button appears in the top corner of supported container screens when the client mod is installed and the button is enabled.
- The default sort key is P. It can be rebound in the controls screen.
Commands
| Command | Description | Availability |
|---|---|---|
| /sort | Sorts the open storage container, or the player inventory when no container is open | All versions (1.1.0) |
| /sort container | Sorts the currently open storage container | 26.3 build |
| /sort inventory | Sorts the player inventory using the enabled part toggles | 26.3 build |
| /sort main | Same as /sort inventory | 26.3 build |
| /sort hotbar | Sorts only the hotbar, temporarily bypassing the hotbar lock | 26.3 build |
| /sort reload | Reloads smart_sorter_config.json from disk (requires admin permission) | 26.3 build |
On older builds (1.21, 26.1, 26.2) only /sort is available: it sorts the open container, or the player inventory when no container is open.
Configuration
The file is config/smart_sorter_config.json. It is created with defaults on first run. Restart the game or server after editing, or run /sort reload on the 26.3 build.
Full option table (26.3 build):
| Setting | Description | Default |
|---|---|---|
| rawMode | Hides the client S button and P keybind; automatic sorting and commands keep working | false |
| autoSortOnClose | Master switch for all automatic sorting on close | true |
| manualSortingOnly | Disables all automatic sorting; sort only via S button, P key, or commands | false |
| sortChests | Sort chest and double-chest storage | true |
| sortEnderChests | Sort ender chests | true |
| sortBarrels | Sort barrels | true |
| sortShulkers | Sort shulker boxes | true |
| sortHoppers | Sort hoppers | true |
| sortDispensersDroppers | Sort dispensers and droppers | true |
| sortOtherContainers | Sort other safe storage layouts (including compatible modded storage) | true |
| sortPlayerInventoryOnClose | Sort the player inventory after it closes | true |
| sortPlayerMain | Include main inventory slots 9-35 | true |
| sortPlayerHotbar | Include hotbar slots 0-8 (ignored while lockHotbar is true) | false |
| sortArmorSlots | Include armor slots 36-39 | false |
| sortOffhandSlot | Include offhand handling | false |
| lockHotbar | Preserves all nine hotbar slots during player inventory sorting | true |
| showSortButton | Shows or hides the client-side S button | true |
| enableKeybind | Enables or disables the client-side P key | true |
| sortingMethod | Sort order: CREATIVE_TAB, ALPHABETICAL, or ID | CREATIVE_TAB |
| excludedItems | Item IDs that are never moved, for example ["minecraft:elytra"] | [] |
| onlySortItems | When non-empty, only these item IDs take part in sorting | [] |
Options on older builds (1.21, 26.1, 26.2, version 1.1.0): rawMode, autoSortOnClose, manualSortingOnly, sortChests, sortBarrels, sortShulkers, sortOtherContainers, sortPlayerInventoryOnClose, lockHotbar, sortingMethod. Ender-chest, hopper, dispenser, per-part, button, keybind, and item-filter options are 26.3-only for now.
Useful presets:
Button-only sorting (no automation):
"autoSortOnClose": true,
"manualSortingOnly": true,
"showSortButton": true,
"enableKeybind": true
Zero interface, automation only:
"rawMode": true
Never touch specific items:
"excludedItems": ["minecraft:nether_star", "minecraft:elytra"],
"onlySortItems": []
Sorting methods
- CREATIVE_TAB: groups items by Creative inventory category, then by name.
- ALPHABETICAL: sorts by displayed item name, case-insensitive.
- ID: sorts by item registry identifier.
Requirements
- Fabric Loader and Fabric API matching your Minecraft version (26.3 was built against Loader 0.19.5 and Fabric API 0.161.0+26.3).
- Java 21 for Minecraft 1.21 to 1.21.11.
- Java 25 for Minecraft 26.1 to 26.1.2, 26.2, and 26.3.
Notes
- The mod is server-authoritative: on servers it edits the real inventory, so results persist and stay in sync for all players.
- A client-only install on an unmodded server cannot sort server-side inventories; install the mod on the server for that.
- Sorting runs once when an inventory closes, not every tick, so there is no constant background cost.
- Version 1.1.0 for 26.3 additionally adapts to Mojang changes in 26.3: SDL3-based input (no more GLFW key constants), the new server PermissionSet system for admin commands, and the Screen widget registration change.


