@@ -54,7 +54,7 @@ object BetterFirework : Module(
5454 if (player.canOpenElytra || player.isGliding) takeoffState = TakeoffState .StartFlying
5555 else if (player.canTakeoff) takeoffState = TakeoffState .Jumping
5656 }
57- private var midFlightActivationKey by setting(" Mid-Flight Activation Key" , Bind ( 0 , 0 ) , " Firework use key for mid flight activation" )
57+ private var midFlightActivationKey by setting(" Mid-Flight Activation Key" , Bind . EMPTY , " Firework use key for mid flight activation" )
5858 .onPress { if (player.isGliding) takeoffState = TakeoffState .StartFlying }
5959 private var middleClickCancel by setting(" Middle Click Cancel" , false , description = " Cancel pick block action on middle mouse click" ) { activateButton.key != KeyCode .Unbound .code }
6060 private var fireworkInteract by setting(" Right Click Fly" , true , " Automatically start flying when right clicking fireworks" )
@@ -133,17 +133,9 @@ object BetterFirework : Module(
133133 runSafe {
134134 when {
135135 (mc.crosshairTarget?.type == HitResult .Type .BLOCK && ! middleClickCancel) ||
136- ( ! activateButton.isMouseBind || activateButton. mouse != mc.options.pickItemKey.boundKey.code) ||
136+ activateButton.mouse != mc.options.pickItemKey.boundKey.code ||
137137 takeoffState != TakeoffState .None -> false // Prevent using multiple times
138- else -> {
139- if (player.canOpenElytra || player.isGliding) {
140- // If already gliding use another firework
141- takeoffState = TakeoffState .StartFlying
142- } else if (player.canTakeoff) {
143- takeoffState = TakeoffState .Jumping
144- }
145- middleClickCancel
146- }
138+ else -> middleClickCancel
147139 }
148140 } ? : false
149141
0 commit comments