rearrange for consistency
This commit is contained in:
parent
b32c9f1724
commit
711037b619
@ -112,9 +112,12 @@ public final class InventoryBehavior extends Behavior {
|
|||||||
if (stack.isEmpty()) {
|
if (stack.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (Baritone.settings().itemSaver.value && stack.getItemDamage() >= stack.getMaxDamage() && stack.getMaxDamage() > 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (cla$$.isInstance(stack.getItem())) {
|
if (cla$$.isInstance(stack.getItem())) {
|
||||||
double speed = ToolSet.calculateSpeedVsBlock(stack, against.getDefaultState()); // takes into account enchants
|
double speed = ToolSet.calculateSpeedVsBlock(stack, against.getDefaultState()); // takes into account enchants
|
||||||
if (speed > bestSpeed && !(stack.getItemDamage() >= stack.getMaxDamage() && Baritone.settings().itemSaver.value && stack.getMaxDamage() > 1)) {
|
if (speed > bestSpeed) {
|
||||||
bestSpeed = speed;
|
bestSpeed = speed;
|
||||||
bestInd = i;
|
bestInd = i;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ public class ToolSet {
|
|||||||
IBlockState blockState = b.getDefaultState();
|
IBlockState blockState = b.getDefaultState();
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
ItemStack itemStack = player.inventory.getStackInSlot(i);
|
ItemStack itemStack = player.inventory.getStackInSlot(i);
|
||||||
if (itemStack.getItemDamage() >= itemStack.getMaxDamage() && Baritone.settings().itemSaver.value && itemStack.getMaxDamage() > 1) {
|
if (Baritone.settings().itemSaver.value && itemStack.getItemDamage() >= itemStack.getMaxDamage() && itemStack.getMaxDamage() > 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double speed = calculateSpeedVsBlock(itemStack, blockState);
|
double speed = calculateSpeedVsBlock(itemStack, blockState);
|
||||||
|
Loading…
Reference in New Issue
Block a user