Why calculate stuff that isnt needed...

This commit is contained in:
RealIndrit 2020-08-13 22:47:40 +02:00
parent 2ddc2c3660
commit 2b6fe188ed
2 changed files with 4 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

@ -127,7 +127,7 @@ public class ToolSet {
}
}
}
return Baritone.settings().autoTool.value? best : player.inventory.currentItem;
return best;
}
/**