ok its based now

This commit is contained in:
Leijurv 2023-07-30 22:47:39 -07:00
parent 54511f13d9
commit 7e9cf2e1e9
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 10 additions and 3 deletions

View File

@ -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);

View File

@ -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));