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.-
There is a glitch with all versions that allows you to teleport if the wrong tool is equipped to break two blocks in a row. it can be used to essentially set checkpoints to teleport between by swicthing tools.
also what does "Mow when fighting" do?
In reply to PrismFox67:
Can you provide the exact method to reproduce this teleportation?
See wiki entry here for more info (feel free to ask for clarity if it's not clear)
In reply to Deximus_Maximus:
With Autoswitch enabled:
go over to dirt. Click once with your pic axe out. It will appear as if the block instant mines but it will re appear and switch to the shovel. Do not click again to break the block. With the shovel still out, walk over to stone. Click with the shovel. This will teleport you back to the dirt you were at earlier. Click again with a pic on dirt and it will take you back to the stone. You can do this as far as render distance allows, and it is also possible on paper buckit servers that have anti cheat already enabled.
In reply to PrismFox67:
Is this being done only in multiplayer worlds? Vanilla/ Fabric servers, or only on bukkit?
What version are you using, of both minecraft and autoswitch?
Are there other mods installed?
Would you be able to make a video of it?
In reply to Deximus_Maximus:
I am using Fabric Loader 1.15.1 as my client, with a few UI mods but no actual game mods
The server is on 1.15.1 and is a vanilla server with a few plugins, no mods.
This has happened for me from version 0.4.0 all the way through 0.10.0, which are all the ones compatible with 1.15
Here is a video from the server, while using 0.10.0 (special note that this was much easier to control in 0.4.0. In 0.10.0, for some reason after breaking a block with the tool it switches too, it always switches back. so I can hold out my shovel, break a stone with the autoswitched pic in a second and when i release click, i have out the shovel again.) https://imgur.com/a/1wdl48q
Ill test Singleplayer now and reply with a video also
In reply to Deximus_Maximus:
In reply to Deximus_Maximus:
This does not happen in Singleplayer
In reply to PrismFox67:
Is there some kind of build protection in the locations where this happens? Like something to prevent you from breaking a block?EDIT: this might be a bug with bukkit/paper. I am unable to reproduce this.
In reply to Deximus_Maximus:
Will you be able to optimize the mod for bukkit / paper servers?
In reply to PrismFox67:
I don't know how those servers work, and there's only so much I can do on my end. Maybe disabling switchback might help, but I really do not know what's wrong.
I am unable to reproduce this bug, so I can't test a fix or even make one.
Autoswitch is at no point aware of the player's position, let alone trying to set it.
In reply to Deximus_Maximus:
Let us try to disable switchback and maybe that will help
In reply to PrismFox67:
Did it work?
In reply to Deximus_Maximus:
with version 0.11.1, I can still teleport
i cant toggle my perspective using it for 1.14.4
In reply to Fighting_King01:
What do you mean by perspective?
In reply to Deximus_Maximus:
I cant toggle my F5 mode in 1.14.4
In reply to Fighting_King01:
Using AS 0.3.1 on 1.14.4 I am unable to reproduce this. Maybe check your keybindings, something may be conflicting with F5
Awesome single player survival mod so far!
Any chance of compatibility with Vanilla Hammers, Vanilla Toolsets and Vanilla Excavators in the future?
In reply to Slycan:
If they add their tools to FabricToolTags they should work automatically.
Looks like not working on servers. In single works pefectly. Sad.
In reply to Yeqqi:
I'll try and fix that in the next version (built version has some other bugs as well it seems, though most of those are fixed already)