From caf24799ea1152ee452e3ea35c1338acc8c9c3e0 Mon Sep 17 00:00:00 2001 From: mdenials <46415607+mdenials@users.noreply.github.com> Date: Sat, 11 Nov 2023 11:01:49 +0500 Subject: [PATCH] Update MobEspHack.java --- .../net/wurstclient/hacks/MobEspHack.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/wurstclient/hacks/MobEspHack.java b/src/main/java/net/wurstclient/hacks/MobEspHack.java index f2eaa8b660..b4f6cea7fc 100644 --- a/src/main/java/net/wurstclient/hacks/MobEspHack.java +++ b/src/main/java/net/wurstclient/hacks/MobEspHack.java @@ -59,10 +59,10 @@ public final class MobEspHack extends Hack implements UpdateListener, "Renders a colored box within the target, inversely proportional to its remaining health.", true); - private final CheckboxSetting monoCrome = new CheckboxSetting( + private final CheckboxSetting monocromeColor = new CheckboxSetting( "Monochrome color", "Renders all mobs in the selected color", - true); + false); private final EspBoxSizeSetting boxSize = new EspBoxSizeSetting( "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each mob.\n" @@ -96,7 +96,6 @@ public final class MobEspHack extends Hack implements UpdateListener, private final ArrayList mobs = new ArrayList<>(); private VertexBuffer mobBox; - public LivingEntity le; public MobEspHack() { @@ -198,9 +197,8 @@ private void renderBoxes(MatrixStack matrixStack, float partialTicks, float green = 2 - red; float f = MC.player.distanceTo(e) / 20F; float[] colorF = color.getColorF(); - le = e; if(damageIndicator.isChecked()) { - p = (le.getMaxHealth() - le.getHealth()) / le.getMaxHealth(); + p = (e.getMaxHealth() - e.getHealth()) / e.getMaxHealth(); RenderSystem.setShaderColor(red, green, 0, 0.5F); } else { @@ -229,15 +227,14 @@ private void renderBoxes(MatrixStack matrixStack, float partialTicks, private void renderTracers(MatrixStack matrixStack, float partialTicks, RegionPos region) { - float[] colorF = color.getColorF(); RenderSystem.setShader(GameRenderer::getPositionColorProgram); - if(monoChrome.isChecked()) { + RenderSystem.setShaderColor(1, 1, 1, 1); + + if(monocromeColor.isChecked()) { + float[] colorF = color.getColorF(); RenderSystem.setShaderColor(colorF[0], colorF[1], colorF[2], 1); } - else { - RenderSystem.setShaderColor(1, 1, 1, 1); - } - + Matrix4f matrix = matrixStack.peek().getPositionMatrix(); Tessellator tessellator = RenderSystem.renderThreadTesselator();