Skip to content

Commit

Permalink
Fix logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganDark committed Sep 1, 2019
1 parent 48f6d33 commit 0b953a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/baritone/utils/ToolSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public byte getBestSlot(Block b, boolean preferSilkTouch) {
bestSilkTouch = silkTouch;
} else if (speed == highestSpeed) {
int cost = getMaterialCost(itemStack);
if ((cost < lowestCost && (!preferSilkTouch || (!bestSilkTouch && silkTouch)))) {
if (cost < lowestCost && (silkTouch || !bestSilkTouch) ||
(preferSilkTouch && !bestSilkTouch && silkTouch)) {
highestSpeed = speed;
best = i;
lowestCost = cost;
Expand Down

0 comments on commit 0b953a2

Please sign in to comment.