Inventory/Sort layers
Main article: Inventory § Sorting
Below is a list of categories used when sorting the inventory or a chest.
| Layer | Condition | Order | Notes |
|---|---|---|---|
| Weapons - Melee | Melee weapons with no pickaxe, axe, or hammer power | Base rarity (high to low), then base damage (high to low) | Order varies.[1] |
| Weapons - Ranged | Ranged weapons, except consumable ranged weapons, ammo, and Coin Gun | Base rarity (high to low), then base damage (high to low) | Order varies.[1] |
| Weapons - Magic | Magic weapons | Base Rarity (high to low), then base damage (high to low) | Order varies.[1] |
| Weapons - Summon | Summon weapons and whips | Base rarity (high to low), then base damage (high to low) | Order varies.[1] |
| Weapons - Assorted | Other non-ammo items with damage stats | Base rarity (high to low), then base damage (high to low) | Includes the Flare Gun, consumable ranged weapons, Grenades, and Thrown Water. |
| Weapons - Ammo | Ammo with damage stats | Base rarity (high to low), then base damage (high to low) | |
| Tools - Picksaws | Tools with both pickaxe and axe power | Pickaxe power (high to low) | |
| Tools - Hamaxes | Tools with both axe and hammer power | Axe power (high to low) | |
| Tools - Pickaxe | Tools with pickaxe power | Pickaxe power (high to low) | |
| Tools - Axes | Tools with pickaxe power | Axe power (high to low) | This layer matches no items due to using the incorrect condition (pickaxe power instead of axe power). |
| Tools - Hammers | Tools with hammer power | Hammer power (high to low) | |
| Tools - Terraforming | Thrown Powder, solutions, Clentaminator, Terraformer | ||
| Weapons - Ammo Leftovers | Ammo with no damage stat | Rarity (high to low), then base damage (high to low) | Includes Gel, sand, Ale, and Fallen Stars. |
| Armor - Combat | Non-vanity armor | Rarity (high to low), then defense (high to low), then item ID | |
| Armor - Vanity | Vanity armor | Rarity (high to low), then item ID | |
| Armor - Accessories | Accessories | Base rarity (high to low), then defense (high to low), then item ID | |
| Equip - Grapple | Hooks | Rarity (high to low), then item ID | |
| Equip - Mount | Mounts | Rarity (high to low), then item ID | |
| Equip - Cart | Minecarts | Rarity (high to low), then item ID | |
| Equip - Light Pet | Light pets | Rarity (high to low), then item ID | |
| Equip - Vanity pet | Pets | Rarity (high to low), then item ID | |
| Potions - Dyes | Dyes | Rarity (high to low), then dye ID | |
| Potions - Hair Dyes | Hair Dyes | Rarity (high to low), then hair dye ID | |
| Potions - Life | Healing items | Life restored (high to low), then stack count (high to low) | |
| Potions - Mana | Mana potions | Mana restored (high to low), then stack count (high to low) | |
| Potions - Elixirs | Items that restore both health and mana | Life restored (high to low), then stack count (high to low) | As of 1.4.4.9, this layer matches no items. |
| Potions - Buffs | Buff potions and food | Rarity (high to low), then item ID | |
| Misc - Importants | Summoning items, Life Crystals, Mana Crystals, Life Fruit, Magic Conch, Demon Conch, Magic Mirror, Ice Mirror, and their upgrades | ||
| Misc - Painting | Paints and painting tools | Tools, then paint ID, then coating ID | |
| Misc - Wiring | Wiring tools, wire, and mechanisms | ||
| Misc - Materials | Ores, bars, gems, souls, and certain other materials (Shadow Scale, Tissue Sample, Sturdy Fossil, Ectoplasm) | ||
| Misc - Ropes | Ropes and Chains | ||
| Misc - Extractinator | Blocks that can be extracted | ||
| Last - Materials | Axes, Coin Gun, and all other items except blocks, furniture, and walls | Base rarity (high to low), then value (high to low), then stack size (high to low) | |
| Last - Tiles (Frame Important) | Furniture, including banners, statues, paintings, and platforms | Name (A to Z), then stack size (high to low) | |
| Last - Tiles (Common), Walls | Blocks and walls | Name (A to Z), then stack size (high to low) | |
| Last - Not Trash | Items with rarity above white | Rarity (high to low), then name (A to Z), then stack size (high to low) | Matches no items.[2] |
| Last - Trash | Everything else | Rarity (high to low), then name (A to Z), then stack size (high to low) | Matches no items.[2] |