mirror of https://github.com/cabaletta/baritone
ok its based now
This commit is contained in:
parent
54511f13d9
commit
7e9cf2e1e9
|
@ -164,10 +164,11 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
|||
return new PathingCommand(null, PathingCommandType.CANCEL_AND_SET_GOAL);
|
||||
} else if (this.state == State.LANDING) {
|
||||
if (Math.sqrt(ctx.player().motionX * ctx.player().motionX + ctx.player().motionZ * ctx.player().motionZ) > 0.001) {
|
||||
logDirect("Landed, but still moving, waiting for velocity to die down... " + ctx.player().motionX + " " + ctx.player().motionZ);
|
||||
logDirect("Landed, but still moving, waiting for velocity to die down... ");
|
||||
baritone.getInputOverrideHandler().setInputForceState(Input.SNEAK, true);
|
||||
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);
|
||||
}
|
||||
logDirect("Done :)");
|
||||
baritone.getInputOverrideHandler().clearAllKeys();
|
||||
this.onLostControl();
|
||||
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);
|
||||
|
|
|
@ -634,7 +634,10 @@ public final class ElytraBehavior implements Helper {
|
|||
|
||||
for (final Pair<Vec3d, Integer> candidate : candidates) {
|
||||
final Integer augment = candidate.second();
|
||||
final Vec3d dest = candidate.first().add(0, augment, 0);
|
||||
Vec3d dest = candidate.first().add(0, augment, 0);
|
||||
if (landingMode) {
|
||||
dest = dest.add(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
if (augment != 0) {
|
||||
if (i + lookahead >= path.size()) {
|
||||
|
@ -1079,7 +1082,10 @@ public final class ElytraBehavior implements Helper {
|
|||
continue;
|
||||
}
|
||||
final Vec3d last = displacement.get(displacement.size() - 1);
|
||||
final double goodness = goalDirection.dotProduct(last.normalize());
|
||||
double goodness = goalDirection.dotProduct(last.normalize());
|
||||
if (landingMode) {
|
||||
goodness = -goalDelta.subtract(last).length();
|
||||
}
|
||||
final PitchResult bestSoFar = bestResults.peek();
|
||||
if (bestSoFar == null || goodness > bestSoFar.dot) {
|
||||
bestResults.push(new PitchResult(pitch, goodness, displacement));
|
||||
|
|
Loading…
Reference in New Issue