Added AutoToolMovement bypass setting for special usage cases, should not be used it not actually necessary

This commit is contained in:
RealIndrit
2020-08-14 10:58:15 +02:00
parent e0ff16e2dd
commit 19355cb4f2
3 changed files with 12 additions and 2 deletions

View File

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

View File

@@ -103,7 +103,7 @@ public class ToolSet {
*/
public int getBestSlot(Block b, boolean preferSilkTouch) {
// Make all depending calculation respect auto tool value without doing unecessary calculations...
if (!Baritone.settings().autoTool.value) {
if (!Baritone.settings().ignoreAutoToolMovementCost.value) {
return player.inventory.currentItem;
}