diagonal descend option
This commit is contained in:
parent
ae9ab03e51
commit
8a4f48f08d
@ -111,6 +111,15 @@ public class Settings {
|
|||||||
*/
|
*/
|
||||||
public Setting<Boolean> allowJumpAt256 = new Setting<>(false);
|
public Setting<Boolean> allowJumpAt256 = new Setting<>(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow descending diagonally
|
||||||
|
* <p>
|
||||||
|
* Safer than allowParkour yet still slightly unsafe, can make contact with unchecked adjacent blocks, so it's unsafe in the nether.
|
||||||
|
* <p>
|
||||||
|
* For a generic "take some risks" mode I'd turn on this one, parkour, and parkour place.
|
||||||
|
*/
|
||||||
|
public Setting<Boolean> allowDiagonalDescend = new Setting<>(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocks that Baritone is allowed to place (as throwaway, for sneak bridging, pillaring, etc.)
|
* Blocks that Baritone is allowed to place (as throwaway, for sneak bridging, pillaring, etc.)
|
||||||
*/
|
*/
|
||||||
@ -163,10 +172,8 @@ public class Settings {
|
|||||||
* metric gets better and better with each block, instead of slightly worse.
|
* metric gets better and better with each block, instead of slightly worse.
|
||||||
* <p>
|
* <p>
|
||||||
* Finding the optimal path is worth it, so it's the default.
|
* Finding the optimal path is worth it, so it's the default.
|
||||||
* <p>
|
|
||||||
* This value is an expression instead of a literal so that it's exactly equal to SPRINT_ONE_BLOCK_COST defined in ActionCosts.java
|
|
||||||
*/
|
*/
|
||||||
public Setting<Double> costHeuristic = new Setting<>(20 / 5.612);
|
public Setting<Double> costHeuristic = new Setting<>(3.563);
|
||||||
|
|
||||||
// a bunch of obscure internal A* settings that you probably don't want to change
|
// a bunch of obscure internal A* settings that you probably don't want to change
|
||||||
/**
|
/**
|
||||||
|
@ -57,6 +57,7 @@ public class CalculationContext {
|
|||||||
private final boolean allowParkourPlace;
|
private final boolean allowParkourPlace;
|
||||||
private final boolean allowJumpAt256;
|
private final boolean allowJumpAt256;
|
||||||
private final boolean assumeWalkOnWater;
|
private final boolean assumeWalkOnWater;
|
||||||
|
private final boolean allowDiagonalDescend;
|
||||||
private final int maxFallHeightNoWater;
|
private final int maxFallHeightNoWater;
|
||||||
private final int maxFallHeightBucket;
|
private final int maxFallHeightBucket;
|
||||||
private final double waterWalkSpeed;
|
private final double waterWalkSpeed;
|
||||||
@ -86,6 +87,7 @@ public class CalculationContext {
|
|||||||
this.allowParkourPlace = Baritone.settings().allowParkourPlace.get();
|
this.allowParkourPlace = Baritone.settings().allowParkourPlace.get();
|
||||||
this.allowJumpAt256 = Baritone.settings().allowJumpAt256.get();
|
this.allowJumpAt256 = Baritone.settings().allowJumpAt256.get();
|
||||||
this.assumeWalkOnWater = Baritone.settings().assumeWalkOnWater.get();
|
this.assumeWalkOnWater = Baritone.settings().assumeWalkOnWater.get();
|
||||||
|
this.allowDiagonalDescend = Baritone.settings().allowDiagonalDescend.get();
|
||||||
this.maxFallHeightNoWater = Baritone.settings().maxFallHeightNoWater.get();
|
this.maxFallHeightNoWater = Baritone.settings().maxFallHeightNoWater.get();
|
||||||
this.maxFallHeightBucket = Baritone.settings().maxFallHeightBucket.get();
|
this.maxFallHeightBucket = Baritone.settings().maxFallHeightBucket.get();
|
||||||
int depth = EnchantmentHelper.getDepthStriderModifier(player);
|
int depth = EnchantmentHelper.getDepthStriderModifier(player);
|
||||||
@ -201,6 +203,10 @@ public class CalculationContext {
|
|||||||
return assumeWalkOnWater;
|
return assumeWalkOnWater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean allowDiagonalDescend() {
|
||||||
|
return allowDiagonalDescend;
|
||||||
|
}
|
||||||
|
|
||||||
public int maxFallHeightNoWater() {
|
public int maxFallHeightNoWater() {
|
||||||
return maxFallHeightNoWater;
|
return maxFallHeightNoWater;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public class MovementDiagonal extends Movement {
|
|||||||
boolean descend = false;
|
boolean descend = false;
|
||||||
if (!MovementHelper.canWalkOn(context.bsi(), destX, y - 1, destZ, destWalkOn)) {
|
if (!MovementHelper.canWalkOn(context.bsi(), destX, y - 1, destZ, destWalkOn)) {
|
||||||
descend = true;
|
descend = true;
|
||||||
if (!MovementHelper.canWalkOn(context.bsi(), destX, y - 2, destZ) || !MovementHelper.canWalkThrough(context.bsi(), destX, y - 1, destZ, destWalkOn)) {
|
if (!context.allowDiagonalDescend() || !MovementHelper.canWalkOn(context.bsi(), destX, y - 2, destZ) || !MovementHelper.canWalkThrough(context.bsi(), destX, y - 1, destZ, destWalkOn)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user