Skip to content

Commit

Permalink
Update MobEspHack.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mdenials authored Nov 11, 2023
1 parent 639afb0 commit caf2479
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/main/java/net/wurstclient/hacks/MobEspHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -96,7 +96,6 @@ public final class MobEspHack extends Hack implements UpdateListener,

private final ArrayList<LivingEntity> mobs = new ArrayList<>();
private VertexBuffer mobBox;
public LivingEntity le;

public MobEspHack()
{
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit caf2479

Please sign in to comment.