1717
1818package com.lambda.module.modules.movement
1919
20+ import com.lambda.Lambda
2021import com.lambda.Lambda.mc
2122import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
2223import com.lambda.config.applyEdits
@@ -29,7 +30,6 @@ import com.lambda.interaction.managers.hotbar.HotbarRequest
2930import com.lambda.interaction.managers.inventory.InventoryRequest.Companion.inventoryRequest
3031import com.lambda.interaction.material.StackSelection.Companion.selectStack
3132import com.lambda.module.Module
32- import com.lambda.module.modules.movement.BetterFirework.sendSwing
3333import com.lambda.module.tag.ModuleTag
3434import com.lambda.threading.runSafe
3535import com.lambda.util.Communication.warn
@@ -51,8 +51,12 @@ object BetterFirework : Module(
5151 description = " Automatic takeoff with fireworks" ,
5252 tag = ModuleTag .MOVEMENT ,
5353) {
54- private var activateButton by setting(" Activate Key" , Bind (0 , 0 , Mouse .Middle .ordinal), " Button to activate Firework" )
54+ private var activateButton: Bind by setting(" Activate Key" , Bind (0 , 0 , Mouse .Middle .ordinal), " Button to activate Firework" )
5555 .onPress {
56+ if (mc.crosshairTarget?.type == HitResult .Type .BLOCK &&
57+ ! middleClickCancel &&
58+ activateButton.mouse == Lambda .mc.options.pickItemKey.boundKey.code) return @onPress
59+
5660 if (! player.isElytraEquipped) {
5761 warn(" You need to equip an elytra to use this module!" )
5862 return @onPress
0 commit comments