dexman545 / Fabric-Autoswitch

Automagical switching of tools to the best one for the job, for Minecraft
https://www.curseforge.com/minecraft/mc-mods/fabric-autoswitch
GNU Lesser General Public License v3.0
24 stars 6 forks source link

Autoswitch sometimes switches to "wrong' tool for the job #33

Closed babrevian closed 2 years ago

babrevian commented 2 years ago

Hi, thanks for a brilliant mod. I use it a lot. The only issue is that I play a server where, when you break crops with a hoe, it replants the crops. Unfortunately with this mod, when breaking crops it either switches to another tool in your hand, or to your bare hands. It does not use the hoe. This means the crops do not auto replant. Is there a way to fix this so that only a hoe is used to break crops like wheat, potatoes, beet, carrots etc?

dexman545 commented 2 years ago

There's a few cases you'll need to cover: In autoswitchAttackAction.cfg, add minecraft!farmland = or minecraft!farmland = hoe on a new line (this will prevent it switching in the instant after the crop is broken). Then on new lines, add the block id for the various crops in the same way, eg minecraft!wheat = hoe for wheat.

babrevian commented 2 years ago

Thank you. That did the trick. It is working perfect now, but I had to remove the following line from the cfg file before it worked. plant = shears;minecraft:mending, axe;minecraft:mending, shears, axe

Not sure if it will be a major issue later, but for now I am very happy :-D