File tree Expand file tree Collapse file tree
src/main/kotlin/com/lambda/module/modules/movement/elytrafly Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,19 @@ object ElytraFly : Module(
105105 }
106106 }
107107
108+ @JvmStatic
109+ fun getFireworkTargetVelocity (rotPitch : Float , rotYaw : Float ): Vec3d {
110+ var targetSpeed = 1.5 * rocketSpeed
111+ if (angledRocketBoost) {
112+ val scale = sin(Math .toRadians(abs(rotPitch) * 2.0 ))
113+ targetSpeed = (1.5 * rocketSpeed) + (maxAngledBoost * scale)
114+ }
115+ val vec = Vec3d .fromPolar(rotPitch, rotYaw)
116+ val d = targetSpeed
117+ val e = 0.1 * rocketSpeed
118+ return vec.multiply(d + e * 2 )
119+ }
120+
108121 @JvmStatic
109122 fun boostRocket () =
110123 runSafe {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import com.lambda.interaction.managers.rotating.IRotationRequest.Companion.rotat
2727import com.lambda.interaction.managers.rotating.RotationManager
2828import com.lambda.interaction.material.StackSelection.Companion.select
2929import com.lambda.module.modules.movement.BetterFirework.startFirework
30+ import com.lambda.module.modules.movement.elytrafly.ElytraFly
3031import com.lambda.module.modules.movement.elytrafly.ElytraFly.FlyMode
3132import com.lambda.module.modules.movement.elytrafly.ElytraFlyMode
3233import com.lambda.module.modules.render.Freecam
@@ -121,7 +122,10 @@ class GrimControlElytraFly(
121122 rotationRequest { rotation(rot.y, rot.x) }.submit()
122123 if (hasFirework) {
123124 moving = true
124- if (prevStill) player.velocity = Vec3d .ZERO
125+ if (prevStill) {
126+ val activeRot = RotationManager .activeRotation
127+ player.velocity = ElytraFly .getFireworkTargetVelocity(activeRot.pitchF, activeRot.yawF)
128+ }
125129 }
126130 }
127131
You can’t perform that action at this time.
0 commit comments