What Autoswitch Does
Autoswitch (AS) reads the player's hotbar, and finds the best tool for the job currently available based on the config files (ie. you hit a stone block with your fist, it will switch to a pickaxe). These tools have some conditions that need to be satisfied:
Have more than 3 durability remaining configurable
Have the tool on your hotbar
Be capable of mining the block (a naive fallback is in place for mining levels configurable)
It is aware of tool enchantments
AutoSwitch is fully configurable. The config files detail their specifics at their top, and each option is documented within the file. A hotkey is available to quickly toggle switching on or off, along with a toggle command.
Blocks
AS checks the block's Material*, or the specific block's id if it is present in the config file, and will evaluate the tools based on the configuration.
*Note
See the Minecraft Wiki for details. The names used in the config files are the same as the names Fabric uses, which differ from the names on the wiki. Each material is documented within the config file.
Entities
AS checks the entities group*, or the specific id if it is present in the config file, and will evaluate the tools based on the configuration. Bases weapon choices in part on the amount of damage the tool can do.
*Note
See Minecraft Wiki for details on entity groups. Group names are not exactly the same between the wiki and what Fabric uses.
Other
If a mod's tools do not work automatically, tell the mod author of that mod to add their tools to the proper FabricToolTags. Some mods may require other changes to function. Autoswitch provides an API by which mod authors can create their own tool groups similar to the provided pickaxe, axe, etc.-
In reply to Deximus_Maximus:
do you want me to show you a video of it not working?
In reply to senpaidaddyman:
That might help.
Hey Guys,
i love this mod, but sometimes he takes my SIlk Touch Shovel on a normal stone block. I have no clue way, someone got a idea?
I play on a server without silverfish, could that be the issue? So the mod takes a Silk Touch Shovel if there is a silverfish inside a block?
Except this small problem the mod works perfectly fine <3
In reply to Demikun:
All stone blocks, or just one? Are you certain it is a normal block?
Is there an example of a config file with many parameters somewhere?
I just want to use a silk touch pickaxe for stone and a fortune pickaxe for all ores.
In reply to Vexoi:
The default configs are a good example. You'll find them in the config folder.
Ores are trickier as there is no group to target them. One may be added in future, but it will have to rely on tags which make the config a bit more complex. For now you'll have to rely on the block overrides.
In reply to Vexoi:
This is now possible on modded server with 5.1.0. See https://github.com/dexman545/Fabric-Autoswitch/wiki/Config-Details for details.
Hey, just wondering if the mod is working as expected, when it stops using a tool due to low durability I notice it doesn't swap out for another valid tool in the inventory.
I really like the mod even as is but it would be better if it switched tools while preserving.
cheers,
In reply to Fratal:
You can disable tool preservation by setting tryPreserveDamagedTools to false. There are mods to replace broken tools already.
AutoSwitch does not move items around the inventory as it tends to make servers angry. This may change, but for now there are other solutions.
How can I make it to where it doesn't switch at all based on durability. I like the autoswitch for when I'm mining through different blocks, but I don't like the durability preserve.
Edit: I figured it out relatively, if it's in my hotbar it won't swap. But if it's in my inventory it still swaps.
In reply to SebbySaber:
You can disable tryPreserveDamagedTools.
This can be done in autoswitch.cfg, or ingame via /autoswitch command
Thank you!
Is there any way to add glow lichen to the config to auto switch to shears? I can't find the entry for glow lichen in the file and when I went to look at the wiki to manually add it, glow lichen wasn't on the list.
In reply to heatherie_c:
Add minecraft!glow_lichen = shears, axes
я использую последнюю версию fabric api
In reply to Abase_oi:
AS 4.0.3 does not require tool attribute API. Which MC version and AS version are you trying to use?
i need the link to the fabric-tool-attribute-api v1 mod i cant find it on curseforge
In reply to Abase_oi:
Install or update Fabric API
Where exactly can I configure the durability left? And sometimes on server the last tool doesn't switch and breaks entirely; version 4.0.3 on Fabric 0.13.3 and 0.48.0 Fabric API
Hello, I add these rules in autoswitchAttackAction.cfg
minecraft!coal_ore = pickaxe;minecraft:silk_touch, pickaxe;minecraft:mending, pickaxe;minecraft:efficiency, pickaxe
minecraft!deepslate_coal_ore = pickaxe;minecraft:silk_touch, pickaxe;minecraft:mending, pickaxe;minecraft:efficiency, pickaxe
and make stone = any
It works pretty well, but sometimes after i mined some ore and continue mining something like deepslate, it will keep switch to the silktouch pickaxe rather than the normal pickaxe.
Could you help me fix it?