AutoSwitch [Fabric]
No reviews yet
Automatic switching of tools when you perform an action.
Does not follow a specific thematic focus apart from vanilla Minecraft.
Used for mods with little to no gameplay elements.
Includes quality of life improvements and small tweaks to enhance and customize gameplay.
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Neoforge is a fork of the Minecraft Forge available for versions 1.20.1+ of Minecraft. Many Forge mods are compatible with Neoforge and vice versa.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
AutoSwitch
AutoSwitch is a Minecraft mod (for Fabric / NeoForge) that automatically swaps the held item based on what you’re about to do - mining, attacking, interacting, or when specific stats change and what is available on your hotbar (i.e. you hit a stone block with your fist, it will switch to a pickaxe).
It’s rule-driven and highly configurable via a HOCON config file autoswitch.conf,
located in the config folder which is next to the resource pack folder.
A quick way to navigate there is by going to Options > Resource Packs > navigate up one folder.
The mod can be toggled on/off dynamically in game by pressing R.
Configuration
This section only applies to AutoSwitch 12+. Earlier versions used a different config format.
There are four sections in the config file - three for defining selectors and targets when various actions occur, and one for general feature configuration:
attack-action- rules used when attacking (entities or blocks).interact-action- rules used when interacting (right-click-like actions).stat-change-action- rules triggered by stat events (e.g., using a totem of undying).feature-config- Controls the overall behaviour of the mod.
Each rule contains:
priority- integer; higher values are given precedence what multiple targets match.target- what this rule matches (types:BLOCK,ENTITY,STAT, or anEXPRESSIONallowing the combination of other targets). Targets can reference tags or specific explicit IDs (minecraft:ender_chest,sugar_cane).tools- ordered array of candidates to switch to. Each must be anITEMor anEXPRESSIONofITEMs, or be an empty list (to disable switching for that target).
EXPRESSIONs can have as many elements or as much depth as you wish, allowing for a great deal of control.
The default config covers a wide range of cases and should serve as a great basis for expanding.
Tools and targets can have an optional data field to control things like enchantments or blockstates that should be matched.
Live edits
Simply resave the config file when ingame for it to be automatically reloaded.
The Gritty Details
Expressions
Expressions can be nested to any depth you desire.
Expressions support the following operations:
OR- Match any one of its childrenAND- Match all of its childrenNOT- Match none of its childrenXOR- Match only one of its children
Data
Currently, the following data types are supported:
BlockState- The block state to matchComponent- Currently only supportsPOTION_CONTENTSon itemsEnchantment- The enchantments an item hasEntityEquipment- The equipment an entity is wearing, such as a pig with a saddle
Selection Priority
Decision order (first thing that differs wins):
- Target Priority - rules with higher priority are preferred.
- Target Rating (multi-level) - compare rating level 0 - n up to the configured maximum.
At each level compare, in order:
isGroup(prefer non-groups)hasData(prefer those with data)typeRating(higher preferred, e.g. weapon DPS or mining level)dataRating(higher preferred, e.g. normalized enchantment level)
- Tool Priority - prefer tools that are intrinsically prioritized higher.
- Tool Rating (multi-level) - same multi-level comparison logic as Target Rating (isGroup → hasData → typeRating → dataRating).
- Is the slot currently selected? - prefer the currently held slot if tied so far.
- Smallest slot index - final tie-breaker: lowest (leftmost) inventory slot wins.
Text-based Flowchart
START: candidate inventory slots (all slots that matched a selector)
|
v
Compare Target Priority
|-- if different --> choose highest Target Priority --> END
|
v (same)
Compare Target Rating (levels 0..N)
For each level:
- compare: isGroup? (non-group preferred)
- compare: hasData? (with data preferred)
- compare: typeRating (higher wins)
- compare: dataRating (higher wins)
|-- if difference found --> choose winner --> END
|
v (no difference)
Compare Tool Priority
|-- if different --> choose highest Tool Priority --> END
|
v (same)
Compare Tool Rating (levels 0..N)
(same per-level rules as Target Rating)
|-- if difference found --> choose winner --> END
|
v (still tied)
Prefer currently selected slot?
|-- Yes --> choose currently selected --> END
|-- No --> choose smallest (leftmost) slot --> END
AutoSwitch
AutoSwitch is a Minecraft mod (for Fabric / NeoForge) that automatically swaps the held item based on what you’re about to do - mining, attacking, interacting, or when specific stats change and what is available on your hotbar (i.e. you hit a stone block with your fist, it will switch to a pickaxe).
It’s rule-driven and highly configurable via a HOCON config file autoswitch.conf,
located in the config folder which is next to the resource pack folder.
A quick way to navigate there is by going to Options > Resource Packs > navigate up one folder.
The mod can be toggled on/off dynamically in game by pressing R.
Configuration
This section only applies to AutoSwitch 12+. Earlier versions used a different config format.
There are four sections in the config file - three for defining selectors and targets when various actions occur, and one for general feature configuration:
attack-action- rules used when attacking (entities or blocks).interact-action- rules used when interacting (right-click-like actions).stat-change-action- rules triggered by stat events (e.g., using a totem of undying).feature-config- Controls the overall behaviour of the mod.
Each rule contains:
priority- integer; higher values are given precedence what multiple targets match.target- what this rule matches (types:BLOCK,ENTITY,STAT, or anEXPRESSIONallowing the combination of other targets). Targets can reference tags or specific explicit IDs (minecraft:ender_chest,sugar_cane).tools- ordered array of candidates to switch to. Each must be anITEMor anEXPRESSIONofITEMs, or be an empty list (to disable switching for that target).
EXPRESSIONs can have as many elements or as much depth as you wish, allowing for a great deal of control.
The default config covers a wide range of cases and should serve as a great basis for expanding.
Tools and targets can have an optional data field to control things like enchantments or blockstates that should be matched.
Live edits
Simply resave the config file when ingame for it to be automatically reloaded.
The Gritty Details
Expressions
Expressions can be nested to any depth you desire.
Expressions support the following operations:
OR- Match any one of its childrenAND- Match all of its childrenNOT- Match none of its childrenXOR- Match only one of its children
Data
Currently, the following data types are supported:
BlockState- The block state to matchComponent- Currently only supportsPOTION_CONTENTSon itemsEnchantment- The enchantments an item hasEntityEquipment- The equipment an entity is wearing, such as a pig with a saddle
Selection Priority
Decision order (first thing that differs wins):
- Target Priority - rules with higher priority are preferred.
- Target Rating (multi-level) - compare rating level 0 - n up to the configured maximum.
At each level compare, in order:
isGroup(prefer non-groups)hasData(prefer those with data)typeRating(higher preferred, e.g. weapon DPS or mining level)dataRating(higher preferred, e.g. normalized enchantment level)
- Tool Priority - prefer tools that are intrinsically prioritized higher.
- Tool Rating (multi-level) - same multi-level comparison logic as Target Rating (isGroup → hasData → typeRating → dataRating).
- Is the slot currently selected? - prefer the currently held slot if tied so far.
- Smallest slot index - final tie-breaker: lowest (leftmost) inventory slot wins.
Text-based Flowchart
START: candidate inventory slots (all slots that matched a selector)
|
v
Compare Target Priority
|-- if different --> choose highest Target Priority --> END
|
v (same)
Compare Target Rating (levels 0..N)
For each level:
- compare: isGroup? (non-group preferred)
- compare: hasData? (with data preferred)
- compare: typeRating (higher wins)
- compare: dataRating (higher wins)
|-- if difference found --> choose winner --> END
|
v (no difference)
Compare Tool Priority
|-- if different --> choose highest Tool Priority --> END
|
v (same)
Compare Tool Rating (levels 0..N)
(same per-level rules as Target Rating)
|-- if difference found --> choose winner --> END
|
v (still tied)
Prefer currently selected slot?
|-- Yes --> choose currently selected --> END
|-- No --> choose smallest (leftmost) slot --> END
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers