Automatic Tool Swap

Automatic Tool Swap

313k Downloads

Feature suggestion

MelanX opened this issue ยท 1 comments

commented

Add a kind of (editable!) priority list that takes the specific block and my tools available (as well as their enchantments) into account when switching the tool/slot.

For example, when I have both a stone pickaxe and a fortune diamond pickaxe in my bar and I'm mining away through what's mostly just stone (like most of the game), I may not want it to use up my fortune pickaxe (not accidentally by selecting it "manually", but also not by having the mod automatically select it either).

In such a case, it should recognize my stone pickaxe because that's probably what I want to use for simple stone instead, and then switch to that (and definitely not the diamond pickaxe), and then when I encounter any ores that wouldn't drop anything when mined with the stone pickaxe, the mod should go by the priority list and select the next best (matching) tool, in my case the fortune diamond pickaxe.

Let's say the list said something like "for diamond ore, use any viable fortune pickaxe first, then any other viable enchanted pickaxe, then any viable pickaxe", viable meaning it also requires it to be at least an iron pickaxe.

I don't know if there's a way to query the game for the tools needed to mine a block so that it drops something, otherwise that should just be part of the list. Of course, with ores that need smelting anyway, the fortune enchantment is irrelevant, but it would still be the better tool if the block otherwise wouldn't even drop itself.

As it is now, it just keeps the same old stone pickaxe selected, so that could be an issue, at least when I encounter gold or redstone, or maybe between login sessions I forgot about my "emergency" pickaxe being unenchanted, in which case I wouldn't want it to be used up as long as I still had an alternate tool in the bar, particularly for anything that doesn't necessarily require an iron pickaxe. (I hope that makes sense somehow.)

commented

made something similar, that's enough