tweakeroo icon indicating copy to clipboard operation
tweakeroo copied to clipboard

tweakToolSwitch toggle swaps almost broken tools

Open OzoneOza opened this issue 4 years ago • 3 comments

Version: 1.17.1 File: tweakeroo-fabric-1.17.1-0.10.0-dev.20210710.155746.jar When tweakToolSwitch is true and tweakSwapAlmostBrokenTools set to false, it still swaps almost broken tools. I can adjust the itemSwapDurabilityThreshold and it will work as it should if tweakSwapAlmostBrokenTools was true, even though it's still false. If I then set tweakToolSwitch to false, this issue is resolved. It's as if turning the tool switch on also turns on the swap almost broken tools with zero separation possible.

OzoneOza avatar Aug 15 '21 03:08 OzoneOza

Yes I believe the code that finds the fastest available tool uses the same method that also checks that the tool has enough durability left. I guess I need to change those methods slightly so that it uses the state of the swapAlmostBrokenTools tweak for whether or not it should check the durability when it finds the best tool.

maruohon avatar Aug 15 '21 12:08 maruohon

Ah ok, yeah nothing too major, but I kept trying to get rid of my iron shovels and was a bit of a nuisance.

OzoneOza avatar Aug 16 '21 06:08 OzoneOza

This build should now respect the Swap Almost Broken Tools tweak state in the Tool Switch code, for whether or not it should check the durability of the tool: https://masa.dy.fi/mcmods/tweakeroo/tweakeroo-fabric-1.17.1-0.10.0-dev.20210819.012739.jar

If you don't find anything broken with the new behavior, then I'll go ahead and upload this to CurseForge as well.

maruohon avatar Aug 18 '21 23:08 maruohon