This commit is contained in:
Leijurv 2018-11-01 15:32:58 -07:00
parent 0fbfa32e6b
commit 88e3bcdf63
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -48,11 +48,7 @@ public class CalculationContext implements Helper {
private final BetterWorldBorder worldBorder; private final BetterWorldBorder worldBorder;
public CalculationContext() { public CalculationContext() {
this(new ToolSet()); this.toolSet = new ToolSet();
}
public CalculationContext(ToolSet toolSet) {
this.toolSet = toolSet;
this.hasThrowaway = Baritone.settings().allowPlace.get() && MovementHelper.throwaway(false); this.hasThrowaway = Baritone.settings().allowPlace.get() && MovementHelper.throwaway(false);
this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.get() && InventoryPlayer.isHotbar(player().inventory.getSlotFor(STACK_BUCKET_WATER)) && !world().provider.isNether(); this.hasWaterBucket = Baritone.settings().allowWaterBucketFall.get() && InventoryPlayer.isHotbar(player().inventory.getSlotFor(STACK_BUCKET_WATER)) && !world().provider.isNether();
this.canSprint = Baritone.settings().allowSprint.get() && player().getFoodStats().getFoodLevel() > 6; this.canSprint = Baritone.settings().allowSprint.get() && player().getFoodStats().getFoodLevel() > 6;