Skip to content

Commit ba39b23

Browse files
committed
Update ElytraFlyPlusPlus.java
1 parent 0b6018b commit ba39b23

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main/java/dev/journey/PathSeeker/modules/utility/ElytraFlyPlusPlus.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,19 @@ public class ElytraFlyPlusPlus extends Module {
5353
.build()
5454
);
5555

56+
private final Setting<Boolean> motionYBoost = sgGeneral.add(new BoolSetting.Builder()
57+
.name("Motion Y Boost")
58+
.description("Greatly increases speed by cancelling Y momentum.")
59+
.defaultValue(false)
60+
.visible(bounce::get)
61+
.build()
62+
);
63+
5664
private final Setting<Double> speed = sgGeneral.add(new DoubleSetting.Builder()
5765
.name("Speed")
5866
.description("The speed in blocks per second to keep you at.")
5967
.defaultValue(100.0)
60-
.visible(() -> bounce.get() && lockPitch.get() && autoAdjustPitch.get())
68+
.visible(() -> bounce.get() && (lockPitch.get() && autoAdjustPitch.get() || motionYBoost.get()))
6169
.build()
6270
);
6371

@@ -93,14 +101,6 @@ public class ElytraFlyPlusPlus extends Module {
93101
.build()
94102
);
95103

96-
private final Setting<Boolean> motionYBoost = sgGeneral.add(new BoolSetting.Builder()
97-
.name("Motion Y Boost")
98-
.description("Greatly increases speed by cancelling Y momentum.")
99-
.defaultValue(false)
100-
.visible(bounce::get)
101-
.build()
102-
);
103-
104104
private final Setting<Boolean> highwayObstaclePasser = sgObstaclePasser.add(new BoolSetting.Builder()
105105
.name("Highway Obstacle Passer")
106106
.description("Uses baritone to pass obstacles.")
@@ -384,7 +384,8 @@ else if (tempPath != null)
384384
paused = false;
385385
if (!enabled()) return;
386386

387-
if (enabled() && motionYBoost.get() && mc.player.getVelocity().y > 0)
387+
double playerSpeed = Utils.getPlayerSpeed().multiply(1, 0, 1).length();
388+
if (enabled() && motionYBoost.get() && mc.player.getVelocity().y > 0 && playerSpeed < this.speed.get())
388389
{
389390
mc.player.setVelocity(mc.player.getVelocity().x, 0.0, mc.player.getVelocity().z);
390391
}
@@ -403,7 +404,6 @@ else if (tempPath != null)
403404
{
404405
if (autoAdjustPitch.get())
405406
{
406-
double playerSpeed = Utils.getPlayerSpeed().multiply(1, 0, 1).length();
407407
mc.player.setPitch((float) Math.min(90, Math.max(-90, (speed.get() - playerSpeed) * 5)));
408408
}
409409
else

0 commit comments

Comments
 (0)