trycatch surround fixes it maybe
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m13s

This commit is contained in:
Jess H 2024-06-17 02:33:22 +01:00
parent bb5f5c70cd
commit 5af6ecb9c0
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -1,5 +1,6 @@
package de.com.baseband.client.feature.modules.render; package de.com.baseband.client.feature.modules.render;
import de.com.baseband.client.BaseBand;
import de.com.baseband.client.feature.Feature; import de.com.baseband.client.feature.Feature;
import de.com.baseband.client.feature.Features; import de.com.baseband.client.feature.Features;
import de.com.baseband.client.feature.category.Render; import de.com.baseband.client.feature.category.Render;
@ -62,33 +63,38 @@ public class ESP extends Feature {
@SubscribeEvent @SubscribeEvent
public void render(RenderWorldLastEvent event) { public void render(RenderWorldLastEvent event) {
//this is disgusting and we need to fix it try {
Vec3d eyePos = Objects.requireNonNull(mc.getRenderViewEntity()).getPositionEyes(event.getPartialTicks()).add(0, -mc.getRenderViewEntity().getEyeHeight(), 0); //this is disgusting and we need to fix it
Vec3d eyePos = Objects.requireNonNull(mc.getRenderViewEntity()).getPositionEyes(event.getPartialTicks()).add(0, -mc.getRenderViewEntity().getEyeHeight(), 0);
if(fill) { if (fill) {
ready(); ready();
translate(-eyePos.x, -eyePos.y, -eyePos.z); translate(-eyePos.x, -eyePos.y, -eyePos.z);
color(Pixels.mulTransparency(Features.getFeature(Client.class).theme.getGreenColor() | 0xff000000, opacity)); color(Pixels.mulTransparency(Features.getFeature(Client.class).theme.getGreenColor() | 0xff000000, opacity));
depth(false); depth(false);
begin(GL11.GL_QUADS); begin(GL11.GL_QUADS);
draw(event, RenderAdapter::drawAABBNow); draw(event, RenderAdapter::drawAABBNow);
end(); end();
} }
if(wireframe) { if (wireframe) {
ready(); ready();
translate(-eyePos.x, -eyePos.y, -eyePos.z); translate(-eyePos.x, -eyePos.y, -eyePos.z);
color(Features.getFeature(Client.class).theme.getGreenColor()); color(Features.getFeature(Client.class).theme.getGreenColor());
depth(false); depth(false);
begin(GL11.GL_LINES); begin(GL11.GL_LINES);
draw(event, RenderAdapter::drawAABBLinesNow); draw(event, RenderAdapter::drawAABBLinesNow);
end(); end();
}
} catch (Exception e) {
e.printStackTrace();
BaseBand.LOGGER.error("Please send the above stacktrace to a developer!");
} }
} }