Merge pull request #2635 from ZacSharp/autoTool

Invert disableAutoTool to autoTool
This commit is contained in:
Leijurv 2021-04-20 23:15:10 -07:00 committed by GitHub
commit b79e281074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -70,9 +70,9 @@ public final class Settings {
public final Setting<Boolean> assumeExternalAutoTool = new Setting<>(false);
/**
* If this setting is on, no auto tool will occur at all, not at calculation time nor execution time
* Automatically select the best available tool
*/
public final Setting<Boolean> disableAutoTool = new Setting<>(false);
public final Setting<Boolean> autoTool = new Setting<>(true);
/**
* It doesn't actually take twenty ticks to place a block, this cost is so high

View File

@ -432,7 +432,7 @@ public interface MovementHelper extends ActionCosts, Helper {
* @param ts previously calculated ToolSet
*/
static void switchToBestToolFor(IPlayerContext ctx, IBlockState b, ToolSet ts, boolean preferSilkTouch) {
if (!Baritone.settings().disableAutoTool.value && !Baritone.settings().assumeExternalAutoTool.value) {
if (Baritone.settings().autoTool.value && !Baritone.settings().assumeExternalAutoTool.value) {
ctx.player().inventory.currentItem = ts.getBestSlot(b.getBlock(), preferSilkTouch);
}
}

View File

@ -114,7 +114,7 @@ public class ToolSet {
If we actually want know what efficiency our held item has instead of the best one
possible, this lets us make pathing depend on the actual tool to be used (if auto tool is disabled)
*/
if (Baritone.settings().disableAutoTool.value && pathingCalculation) {
if (!Baritone.settings().autoTool.value && pathingCalculation) {
return player.inventory.currentItem;
}