88import meteordevelopment .meteorclient .systems .modules .Module ;
99import meteordevelopment .meteorclient .systems .modules .Modules ;
1010import meteordevelopment .meteorclient .systems .modules .combat .KillAura ;
11+ import meteordevelopment .meteorclient .systems .modules .movement .Flight ;
12+ import meteordevelopment .meteorclient .systems .modules .movement .elytrafly .ElytraFly ;
1113import meteordevelopment .meteorclient .utils .entity .DamageUtils ;
1214import nekiplay .meteorplus .MeteorPlusAddon ;
1315import nekiplay .meteorplus .features .modules .combat .Teams ;
16+ import nekiplay .meteorplus .features .modules .movement .elytrafly .ElytraFlyPlus ;
1417import net .minecraft .entity .Entity ;
1518import net .minecraft .entity .EntityType ;
1619import net .minecraft .entity .LivingEntity ;
@@ -73,6 +76,7 @@ public Entity getTarget() {
7376 .visible (() -> !customDelay .get ())
7477 .build ()
7578 );
79+
7680 @ Unique
7781 private final Setting <Integer > maxHurtTime = sgTimingPlus .add (new IntSetting .Builder ()
7882 .name ("max-enemy-hurt-time" )
@@ -91,6 +95,13 @@ public Entity getTarget() {
9195 .build ()
9296 );
9397
98+ @ Unique
99+ private final Setting <Boolean > onlyCritsIgnoreFlight = sgTimingPlus .add (new BoolSetting .Builder ()
100+ .name ("ignore-only-crits-on-flight" )
101+ .defaultValue (true )
102+ .build ()
103+ );
104+
94105 @ Unique
95106 private final Setting <Boolean > ignoreOnlyCritsOnLevitation = sgTimingPlus .add (new BoolSetting .Builder ()
96107 .name ("ignore-only-crits-on-levetation" )
@@ -145,12 +156,17 @@ public KillAuraMixin(Category category, String name, String description) {
145156
146157 @ Inject (method = "delayCheck" , at = @ At ("HEAD" ), cancellable = true )
147158 private void delayCheck (CallbackInfoReturnable <Boolean > cir ) {
159+ Modules modules = Modules .get ();
148160 if (onlyCrits .get () && !allowCrit () && needCrit (getTarget ())) {
149161 if (ignoreOnlyCritsOnLevitation .get () && !Objects .requireNonNull (mc .player ).hasStatusEffect (StatusEffects .LEVITATION )) {
150162 cir .setReturnValue (false );
151163 return ;
152164 }
153- else if (!ignoreOnlyCritsOnLevitation .get ()) {
165+ else if (onlyCritsIgnoreFlight .get () && (!modules .isActive (Flight .class ) && !modules .isActive (ElytraFly .class ) && !modules .isActive (ElytraFlyPlus .class ))) {
166+ cir .setReturnValue (false );
167+ return ;
168+ }
169+ else if (!ignoreOnlyCritsOnLevitation .get () && !onlyCritsIgnoreFlight .get ()) {
154170 cir .setReturnValue (false );
155171 return ;
156172 }
0 commit comments