1
1
package nekiplay .meteorplus .mixin .meteorclient .modules ;
2
2
3
- import meteordevelopment .meteorclient .events .render .Render3DEvent ;
4
- import meteordevelopment .meteorclient .settings .*;
3
+ import meteordevelopment .meteorclient .settings .BoolSetting ;
4
+ import meteordevelopment .meteorclient .settings .IntSetting ;
5
+ import meteordevelopment .meteorclient .settings .Setting ;
6
+ import meteordevelopment .meteorclient .settings .SettingGroup ;
5
7
import meteordevelopment .meteorclient .systems .modules .Category ;
6
8
import meteordevelopment .meteorclient .systems .modules .Module ;
7
9
import meteordevelopment .meteorclient .systems .modules .Modules ;
8
10
import meteordevelopment .meteorclient .systems .modules .combat .KillAura ;
9
- import meteordevelopment .meteorclient .utils .Utils ;
11
+ import meteordevelopment .meteorclient .systems .modules .movement .Flight ;
12
+ import meteordevelopment .meteorclient .systems .modules .movement .elytrafly .ElytraFly ;
10
13
import meteordevelopment .meteorclient .utils .entity .DamageUtils ;
11
- import meteordevelopment .meteorclient .utils .render .color .Color ;
12
- import meteordevelopment .meteorclient .utils .render .color .SettingColor ;
13
- import meteordevelopment .orbit .EventHandler ;
14
14
import nekiplay .meteorplus .MeteorPlusAddon ;
15
15
import nekiplay .meteorplus .features .modules .combat .Teams ;
16
+ import nekiplay .meteorplus .features .modules .movement .elytrafly .ElytraFlyPlus ;
16
17
import net .minecraft .entity .Entity ;
17
18
import net .minecraft .entity .EntityType ;
18
19
import net .minecraft .entity .LivingEntity ;
@@ -41,9 +42,6 @@ public class KillAuraMixin extends Module {
41
42
@ Unique
42
43
private final SettingGroup sgTimingPlus = settings .createGroup (MeteorPlusAddon .HUD_TITLE + " Timing" );
43
44
44
- @ Unique
45
- private final SettingGroup sgRenderPlus = settings .createGroup (MeteorPlusAddon .HUD_TITLE + " Render" );
46
-
47
45
@ Final
48
46
@ Shadow
49
47
private final SettingGroup sgTargeting = settings .getGroup ("Targeting" );
@@ -52,15 +50,6 @@ public class KillAuraMixin extends Module {
52
50
@ Shadow
53
51
private final SettingGroup sgTiming = settings .getGroup ("Timing" );
54
52
55
- @ Final
56
- @ Shadow
57
- private final Setting <Double > range = (Setting <Double >) sgTargeting .get ("range" );
58
-
59
- @ Final
60
- @ Shadow
61
- private final Setting <Double > wallsRange = (Setting <Double >) sgTargeting .get ("walls-range" );
62
-
63
-
64
53
@ Final
65
54
@ Shadow
66
55
private final Setting <Set <EntityType <?>>> entities = (Setting <Set <EntityType <?>>>) sgTargeting .get ("entities" );
@@ -87,6 +76,7 @@ public Entity getTarget() {
87
76
.visible (() -> !customDelay .get ())
88
77
.build ()
89
78
);
79
+
90
80
@ Unique
91
81
private final Setting <Integer > maxHurtTime = sgTimingPlus .add (new IntSetting .Builder ()
92
82
.name ("max-enemy-hurt-time" )
@@ -105,6 +95,13 @@ public Entity getTarget() {
105
95
.build ()
106
96
);
107
97
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
+
108
105
@ Unique
109
106
private final Setting <Boolean > ignoreOnlyCritsOnLevitation = sgTimingPlus .add (new BoolSetting .Builder ()
110
107
.name ("ignore-only-crits-on-levetation" )
@@ -146,7 +143,7 @@ public Entity getTarget() {
146
143
.defaultValue (2 )
147
144
.min (0 )
148
145
.sliderMax (60 )
149
- .visible (customDelay ::get )
146
+ .visible (customDelayOneHit ::get )
150
147
.build ()
151
148
);
152
149
@@ -159,12 +156,17 @@ public KillAuraMixin(Category category, String name, String description) {
159
156
160
157
@ Inject (method = "delayCheck" , at = @ At ("HEAD" ), cancellable = true )
161
158
private void delayCheck (CallbackInfoReturnable <Boolean > cir ) {
159
+ Modules modules = Modules .get ();
162
160
if (onlyCrits .get () && !allowCrit () && needCrit (getTarget ())) {
163
161
if (ignoreOnlyCritsOnLevitation .get () && !Objects .requireNonNull (mc .player ).hasStatusEffect (StatusEffects .LEVITATION )) {
164
162
cir .setReturnValue (false );
165
163
return ;
166
164
}
167
- 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 ()) {
168
170
cir .setReturnValue (false );
169
171
return ;
170
172
}
@@ -236,4 +238,4 @@ protected void entityCheck(Entity entity, CallbackInfoReturnable<Boolean> cir) {
236
238
}
237
239
}
238
240
}
239
- }
241
+ }
0 commit comments