mirror of https://github.com/cabaletta/baritone
allow overshooting traverse
This commit is contained in:
parent
2a5ef35794
commit
7dcd7384f1
|
@ -215,6 +215,13 @@ public final class Settings {
|
|||
*/
|
||||
public final Setting<Boolean> sprintAscends = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* If we overshoot a traverse and end up one block beyond the destination, mark it as successful anyway.
|
||||
* <p>
|
||||
* This helps with speed at >=20m/s
|
||||
*/
|
||||
public final Setting<Boolean> overshootTraverse = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* When breaking blocks for a movement, wait until all falling blocks have settled before continuing
|
||||
*/
|
||||
|
|
|
@ -36,8 +36,6 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class MovementTraverse extends Movement {
|
||||
|
||||
/**
|
||||
|
@ -230,7 +228,11 @@ public class MovementTraverse extends Movement {
|
|||
}
|
||||
|
||||
if (isTheBridgeBlockThere) {
|
||||
if (ctx.playerFeet().equals(dest)) {
|
||||
BetterBlockPos feet = ctx.playerFeet();
|
||||
if (feet.equals(dest)) {
|
||||
return state.setStatus(MovementStatus.SUCCESS);
|
||||
}
|
||||
if (Baritone.settings().overshootTraverse.value && (feet.equals(dest.add(getDirection())) || feet.equals(dest.add(getDirection()).add(getDirection())))) {
|
||||
return state.setStatus(MovementStatus.SUCCESS);
|
||||
}
|
||||
Block low = BlockStateInterface.get(ctx, src).getBlock();
|
||||
|
|
Loading…
Reference in New Issue