Maybe dont have ignore cost calculation override auto tool?
This commit is contained in:
parent
ac55de63e9
commit
2eba22031a
@ -67,9 +67,11 @@ public final class Settings {
|
||||
public final Setting<Boolean> autoTool = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Should movement cost calculation ignore the cost of breaking blocks with current slot?
|
||||
* Should movement cost calculation ignore the cost of breaking blocks with current slot, and assume best possible
|
||||
* item in the hotbar?
|
||||
*
|
||||
* Only use this if actually necessary, make sure to put this back to original state (false), or it
|
||||
* migth mess up pathing in some combinations with auto tool setting. (just fall back to original settings if any
|
||||
* might mess up pathing in some combinations with auto tool setting. (just fall back to original settings if any
|
||||
* problems occurs)
|
||||
*/
|
||||
public final Setting<Boolean> ignoreAutoToolMovementCost = new Setting<>(false);
|
||||
|
@ -96,7 +96,8 @@ public class ToolSet {
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate which tool on the hotbar is best for mining
|
||||
* Calculate which tool on the hotbar is best for mining, depending on an override setting,
|
||||
* related to auto tool movement cost, it will either return current selected slot, or the best slot.
|
||||
*
|
||||
* @param b the blockstate to be mined
|
||||
* @return An int containing the index in the tools array that worked best
|
||||
@ -107,7 +108,11 @@ public class ToolSet {
|
||||
}
|
||||
|
||||
public int getBestSlot(Block b, boolean preferSilkTouch, boolean pathingCalculation) {
|
||||
// Make all depending calculation respect auto tool value without doing unecessary calculations...
|
||||
|
||||
/*
|
||||
If we actually want know what efficiency our held item has instead of the best one
|
||||
possible, this lets us make pathing depending on the actual tool used (if auto tool is disabled)
|
||||
*/
|
||||
if (!Baritone.settings().ignoreAutoToolMovementCost.value && pathingCalculation) {
|
||||
return player.inventory.currentItem;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user