File tree Expand file tree Collapse file tree
src/main/java/meanwhile131/elytrainfinite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ public class ElytraInfinite implements ClientModInitializer {
3333 static final float pitchDown = 34f ;
3434 static final float pitchUp = -47f ;
3535 static final float pitchDownSpeed = 0.5f ;
36+ static final int pitchUpHeight = 5 ;
37+ static final double pitchUpVelocity = 5f ;
3638 private FlyState state = FlyState .NOT_FLYING ;
3739 private static KeyBinding toggleKeybind ;
3840 private float pitch ;
@@ -63,7 +65,7 @@ public void onInitializeClient() {
6365 if (state == FlyState .GLIDING_DOWN ) {
6466 BlockPos pos = player .getBlockPos ();
6567 int height = world .getChunk (pos ).sampleHeightmap (Heightmap .Type .WORLD_SURFACE , pos .getX (), pos .getZ ());
66- if (pos .getY () - height < 5 ) {
68+ if (pos .getY () - height < pitchUp || player . getVelocity (). lengthSquared () > pitchUpVelocity ) {
6769 pitch = pitchUp ;
6870 state = FlyState .PITCHING_DOWN ;
6971 }
You can’t perform that action at this time.
0 commit comments