Skip to content

Commit a96efdc

Browse files
Big-Iron-CheemsWide-Cat
authored andcommitted
Fix Glow ESP
Authored by WideCat
1 parent 624bed4 commit a96efdc

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/main/java/meteordevelopment/meteorclient/mixin/MinecraftClientMixin.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import meteordevelopment.meteorclient.systems.modules.Modules;
2323
import meteordevelopment.meteorclient.systems.modules.player.FastUse;
2424
import meteordevelopment.meteorclient.systems.modules.player.Multitask;
25+
import meteordevelopment.meteorclient.systems.modules.render.ESP;
2526
import meteordevelopment.meteorclient.systems.modules.world.HighwayBuilder;
2627
import meteordevelopment.meteorclient.utils.Utils;
2728
import meteordevelopment.meteorclient.utils.misc.CPSUtils;
@@ -36,6 +37,7 @@
3637
import net.minecraft.client.option.GameOptions;
3738
import net.minecraft.client.util.Window;
3839
import net.minecraft.client.world.ClientWorld;
40+
import net.minecraft.entity.Entity;
3941
import net.minecraft.entity.player.PlayerEntity;
4042
import net.minecraft.item.ItemStack;
4143
import net.minecraft.util.hit.HitResult;
@@ -198,7 +200,7 @@ private void onRender(CallbackInfo info) {
198200
lastTime = time;
199201
}
200202

201-
// multitask
203+
// Multitask
202204

203205
@ModifyExpressionValue(method = "doItemUse", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;isBreakingBlock()Z"))
204206
private boolean doItemUseModifyIsBreakingBlock(boolean original) {
@@ -223,6 +225,17 @@ private void handleInputEventsInjectStopUsingItem(CallbackInfo info) {
223225
}
224226
}
225227

228+
// Glow esp
229+
230+
@ModifyReturnValue(method = "hasOutline", at = @At("RETURN"))
231+
private boolean hasOutlineModifyIsOutline(boolean original, Entity entity) {
232+
ESP esp = Modules.get().get(ESP.class);
233+
if (esp == null) return original;
234+
if (!esp.isGlow() || esp.shouldSkip(entity)) return original;
235+
236+
return esp.getColor(entity) != null || original;
237+
}
238+
226239
// Interface
227240

228241
@Override

src/main/java/meteordevelopment/meteorclient/mixin/WorldRendererMixin.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ private void onRender(CallbackInfo ci) {
111111
PostProcessShaders.endRender();
112112
}
113113

114-
@ModifyExpressionValue(method = "renderEntities", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;hasOutline(Lnet/minecraft/entity/Entity;)Z"))
115-
private boolean shouldMobGlow(boolean original, @Local Entity entity) {
116-
if (!getESP().isGlow() || getESP().shouldSkip(entity)) return original;
117-
118-
return getESP().getColor(entity) != null || original;
119-
}
120-
121114
@WrapOperation(method = "renderEntities", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/OutlineVertexConsumerProvider;setColor(IIII)V"))
122115
private void setGlowColor(OutlineVertexConsumerProvider instance, int red, int green, int blue, int alpha, Operation<Void> original, @Local LocalRef<Entity> entity) {
123116
if (!getESP().isGlow() || getESP().shouldSkip(entity.get())) original.call(instance, red, green, blue, alpha);

0 commit comments

Comments
 (0)