mirror of
https://github.com/kami-blue/client
synced 2025-05-04 16:47:56 +00:00
Make Math Pitch optional in ElytraFlight
This commit is contained in:
parent
321dc9e9d8
commit
9d68eade85
@ -47,6 +47,7 @@ class ElytraFlight : Module() {
|
|||||||
private val downSpeedBoost = register(Settings.floatBuilder("Down Speed B").withValue(0.04f).withVisibility { mode.value == ElytraFlightMode.BOOST }.build())
|
private val downSpeedBoost = register(Settings.floatBuilder("Down Speed B").withValue(0.04f).withVisibility { mode.value == ElytraFlightMode.BOOST }.build())
|
||||||
|
|
||||||
/* Control */
|
/* Control */
|
||||||
|
private val mathPitch = register(Settings.booleanBuilder("Math Pitch").withValue(false).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
||||||
private val lookBoost = register(Settings.booleanBuilder("Look Boost").withValue(false).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
private val lookBoost = register(Settings.booleanBuilder("Look Boost").withValue(false).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
||||||
private val hoverControl = register(Settings.booleanBuilder("Hover").withValue(false).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
private val hoverControl = register(Settings.booleanBuilder("Hover").withValue(false).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
||||||
private val easyTakeOffControl = register(Settings.booleanBuilder("Easy Takeoff C").withValue(true).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
private val easyTakeOffControl = register(Settings.booleanBuilder("Easy Takeoff C").withValue(true).withVisibility { mode.value == ElytraFlightMode.CONTROL }.build())
|
||||||
@ -77,7 +78,7 @@ class ElytraFlight : Module() {
|
|||||||
* turn it back into degrees and then *-1 because Minecraft pitch is negative
|
* turn it back into degrees and then *-1 because Minecraft pitch is negative
|
||||||
* then subtract -6.5f
|
* then subtract -6.5f
|
||||||
*/
|
*/
|
||||||
if (hoverState) {
|
if (hoverState && mathPitch.value) {
|
||||||
packet.pitch = ((-Math.toDegrees(asin(Vec3d(mc.player.motionX, mc.player.motionY, mc.player.motionZ).normalize().y))).toFloat() - 6.5f)
|
packet.pitch = ((-Math.toDegrees(asin(Vec3d(mc.player.motionX, mc.player.motionY, mc.player.motionZ).normalize().y))).toFloat() - 6.5f)
|
||||||
} else {
|
} else {
|
||||||
packet.pitch = 0.0f
|
packet.pitch = 0.0f
|
||||||
|
Loading…
Reference in New Issue
Block a user