The Best Resource for Minecraft
The Best Resource for Minecraft

Inventory Sorting Mod Wiki

Inventory Sorter is a lightweight, server-side utility mod for Minecraft that provides quick and efficient inventory organization through various triggers like middle-clicking, double-clicking, and dedicated UI buttons.

6 sections · 645 words

Overview#

Inventory Sorter is a lightweight mod designed to keep inventories organized with minimal effort. Unlike traditional sorting mods that simulate manual item movement from the client side, Inventory Sorter is built with a server-side-first philosophy. This design choice ensures that sorting is handled directly by the server, resulting in cleaner networking, reduced desync (ghost items), and compatibility with unmodded (vanilla) clients.

The mod was originally developed by Kyrptonaught and is currently maintained by Meza for modern Minecraft versions, including 1.20.1 and beyond. It is highly compatible with other mods and works across single-player worlds, modpacks, and multiplayer servers.

Sorting Mechanics#

The mod provides several ways to trigger an inventory sort. These methods are designed to be intuitive and non-intrusive during gameplay.

Primary Triggers

  • Middle-Click Sorting: Clicking the middle mouse button (scroll wheel) on any slot within an inventory will immediately sort the contents.
  • Double-Click Sorting: Double-clicking on an empty slot within an inventory will trigger the sorting algorithm.
  • Keybind: By default, players can press the 'P' key (configurable) while an inventory is open to sort it.
  • UI Button: A small 'A-Z' button appears in the top-right corner of supported inventory screens. Clicking this button sorts the inventory.

When a sort is triggered, the client sends a single request to the server. The server then calculates the optimal arrangement based on the configured sort type and updates the inventory slots instantly. This prevents the 'jitter' often seen in client-side mods that move items one by one.

User Interface#

While the core functionality is server-side, the optional client-side installation adds visual elements to enhance the user experience.

  • Sort Button: A compact button labeled with an icon or 'A-Z' is added to the GUI of chests, barrels, player inventories, and modded containers.
  • Visual Feedback: The client mod provides a configuration menu accessible via the standard mod settings screen, allowing players to toggle UI elements on or off.

Commands#

Inventory Sorter includes commands that allow vanilla clients to utilize sorting features even without the mod installed locally. These commands are also useful for automation or troubleshooting.

Command Description
/inventorysorter sort Sorts the inventory currently being viewed by the player.
/inventorysorter toggle Toggles the sorting functionality on or off for the individual player.
/inventorysorter help Displays a list of available sub-commands and usage instructions.

Configuration#

The mod is highly configurable via the inventorysorter.json5 file located in the server's config folder. These settings dictate how items are ordered and which inventories are affected.

Sorting Types

Players can choose from several algorithms to determine how items are grouped:

  • NAME: Sorts items alphabetically based on their localized display name.
  • CATEGORY: Groups items based on their Creative Tab category (e.g., Building Blocks, Food & Drinks).
  • MOD: Groups items by the Mod ID of the mod that added them.
  • ID: Sorts items by their internal registry ID string.

Config Options

Option Type Default Description
middleClick Boolean true Enables or disables sorting via middle-click.
doubleClick Boolean true Enables or disables sorting via double-click on empty slots.
sortButton Boolean true Toggles the visibility of the GUI sort button.
sortKeybind Boolean true Enables or disables the dedicated sorting keybind.
sortType String NAME Sets the default sorting algorithm (NAME, CATEGORY, MOD, ID).
containerBlacklist Array [] A list of container class names that should be ignored by the mod.

Compatibility and Technical Details#

Inventory Sorter is designed for maximum compatibility across the Minecraft ecosystem.

  • Modded Inventories: The mod automatically detects and supports inventories added by other mods (e.g., Iron Chests, Sophisticated Backpacks) without requiring manual patches.
  • Vanilla Clients: Because the logic is server-side, players joining a server with Inventory Sorter can use the /inventorysorter sort command or middle-click/double-click functionality even if they only have a vanilla Minecraft client.
  • Blacklist System: If a specific modded inventory has a custom layout that should not be reorganized (such as a machine with specific input/output slots), it can be added to the containerBlacklist in the configuration file to prevent accidental sorting.