ModsFinder

AutoSwitch

by dexman545

With AutoSwitch installed, the active tool changes on its own when the player attacks or interacts with a block or entity.

FabricNeoForgeClient-side onlyGNU Lesser General Public License v3.0 onlyOpen source1.16 – 26.3

What it does

Each target a player hits or uses can be mapped to a tool. The mod checks the target against rules set in its config file, picks the highest priority match that has a usable tool, and switches the hotbar to that tool. A stone block can bring up a pickaxe, and a gravel patch can bring up a shovel. The tool picked depends on enchantments on the tool, the target's block state, or an entity's equipment.

Rules are written in a HOCON file named autoswitch.conf, found in the config folder next to the resource pack folder. The file has three sections for defining selectors and targets for attack, interact and stat-change actions, and one section for general behavior. The mod can be turned on and off in game with the R key, which is the default.

AutoSwitch requires Fabric API on Fabric. It is published for Fabric and NeoForge across 38 release versions, 1.16 – 26.3, and is a client-side only mod, so servers do not need it. The code is under the GNU Lesser General Public License v3.0 only and is open source.

Key features

  1. Attack and interact rules

    Separate rule sections cover attacks on entities or blocks and right-clicks on them, each with its own targets and tool lists.

  2. Priority ordering

    Rules carry an integer priority, and the highest value wins when several targets match the same action.

  3. Expression targets

    Targets can combine with AND, OR, NOT and XOR, nested to any depth, so rules can describe detailed conditions.

  4. Enchantment and equipment matching

    Selectors can check item enchantments, block states, potion contents or the equipment an entity wears.

  5. Player condition checks

    Rules can depend on the player's state, such as crouching, riding, or standing a set distance from the target.

Compatibility

Latest build for each game version and loader.

26.x5 of 5 versions with builds
26.317.0.017.0.0
26.216.0.016.0.0
26.1.215.0.115.0.1
26.1.115.0.115.0.1
26.115.0.115.0.1
1.21.x12 of 12 versions with builds
1.21.1114.1.014.1.0
1.21.1013.3.013.3.0
1.21.913.3.013.3.0
1.21.812.3.012.3.0
1.21.712.3.012.3.0
1.21.612.3.012.3.0
1.21.511.0.0Not available
1.21.410.0.0Not available
1.21.310.0.0Not available
1.21.210.0.0Not available
1.21.19.1.2Not available
1.219.1.2Not available
1.20.x6 of 6 versions with builds
1.19.x4 of 4 versions with builds
1.18.x3 of 3 versions with builds
1.17.x2 of 2 versions with builds
1.16.x6 of 6 versions with builds
ReleaseBetaAlphaNot available

This mod also publishes snapshot builds. Snapshots are not shown in the matrix.

Requirements

Dependencies declared by the latest file for each loader.

Required 1

Fabric APILightweight and modular API providing common hooks and intercompatibility measures utilized by mods using the Fabric toolchain.
Required

Use cases

Mining and digging

Switching to the right tool for each block saves manual hotbar changes while clearing terrain or mining ore.

Combat with mixed mobs

Rules can select a weapon based on the entity hit or on its equipment, such as a saddled pig needing a different tool.

Who it’s for: Players who switch tools often in survival and creative worlds, and players who want to script their own tool rules through the config file.

Questions

Does AutoSwitch need Fabric API?

Yes. Fabric API is the required dependency on Fabric. On NeoForge the mod runs without it.

Do servers need AutoSwitch installed?

No. Only the player's game needs it, and servers run without it.

How are the tool rules changed?

Edit autoswitch.conf in the config folder. Re-saving that file while the game is running applies the new rules without a restart.

In the catalog

AutoSwitch is one of 36,990 Utility mods on ModsFinder, and one of 25,772 Utility mods for Fabric. 8,071 mods support Minecraft 26.3.

More from dexman545

All projects

Similar mods

What the author says

AutoSwitch is a Minecraft mod available on Fabric and NeoForge for automatically switching the active tool to the correct one when attacking or interacting with blocks or entities - you attack a stone block, it switches to a pickaxe, then when you hit an annoying gravel patch it switches to a shovel. Which tool is…
dexman545, on the Modrinth page

Official listing

Owner
dexman545
Published
2020-12-14
Updated on Modrinth
2026-09-15
Facts verified
2026-10-15

Tags