From 5dc7f93acada5d4eeab140fbffb3a42ff5cb10f8 Mon Sep 17 00:00:00 2001 From: winterflyt <36+winterflyt@noreply.skidsolutions.xyz> Date: Mon, 30 Nov 2026 06:10:40 +0200 Subject: [PATCH] Upload files to "src/openonyx/render/group_k" --- .../render/group_k/CrystalEffectRenderer.java | 308 +++++++++++++ .../render/group_k/CrystalEffectSettings.java | 35 ++ .../render/group_k/TargetESPMath.java | 78 ++++ .../render/group_k/TargetESPRenderer.java | 433 ++++++++++++++++++ .../render/group_k/TargetESPRendererPart.java | 34 ++ 5 files changed, 888 insertions(+) create mode 100644 src/openonyx/render/group_k/CrystalEffectRenderer.java create mode 100644 src/openonyx/render/group_k/CrystalEffectSettings.java create mode 100644 src/openonyx/render/group_k/TargetESPMath.java create mode 100644 src/openonyx/render/group_k/TargetESPRenderer.java create mode 100644 src/openonyx/render/group_k/TargetESPRendererPart.java diff --git a/src/openonyx/render/group_k/CrystalEffectRenderer.java b/src/openonyx/render/group_k/CrystalEffectRenderer.java new file mode 100644 index 0000000..f4b0fc6 --- /dev/null +++ b/src/openonyx/render/group_k/CrystalEffectRenderer.java @@ -0,0 +1,308 @@ +package openonyx.render.group_k; + +import net.minecraft.client.renderer.ActiveRenderInfo; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; +import openonyx.core.MinecraftAccess; +import openonyx.theme.internal.ColorUtils; +import org.lwjgl.opengl.GL11; + +public final class CrystalEffectRenderer implements MinecraftAccess { + private static final float[] i; + private static final float[][] f; + private static final ResourceLocation RESOURCE_LOCATION = new ResourceLocation("onyx", "textures/effect/target_bloom.png"); + private static final int[][] e; + + private void d( + Vec3 vec3, EntityLivingBase entityLivingBase, float f, long l, float g, CrystalEffectSettings crystalEffectSettings, TargetESPState targetESPState + ) { + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + mc.getTextureManager().bindTexture(RESOURCE_LOCATION); + GL11.glTexParameteri(3553, 10241, 9729); + GL11.glTexParameteri(3553, 10240, 9729); + GlStateManager.blendFunc(770, 1); + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR); + Vec3 vec32 = L(entityLivingBase, g); + float h = TargetESPMath.d(entityLivingBase.width); + float ix = TargetESPMath.D(fx); + float j = fx * 0.2F * crystalEffectSettings.bloom(); + int k = TargetESPMath.L(crystalEffectSettings.bloomColor(), j); + float m = TargetESPMath.L(1.5F * crystalEffectSettings.size(), fx); + float n = TargetESPMath.L(0.6F * crystalEffectSettings.size(), fx); + Vec3 vec31 = vec32.addVector(0.0, entityLivingBase.height / 2.0F, 0.0); + + int o; + for (int t = o = 0; t < 18; t = o) { + Vec3 vec33 = L(vec32, entityLivingBase.height, o, h, ix, l, fx); + float r = targetESPState.L(o); + Vec3 vec34 = L(vec33, vec31, r, crystalEffectSettings.reach()); + double d = vec34.xCoord - vec3.xCoord; + double ex = vec34.yCoord - vec3.yCoord; + double q = vec34.zCoord - vec3.zCoord; + int p = r <= 0.0F + ? k + : TargetESPMath.L(TargetESPMath.d(crystalEffectSettings.bloomColor(), crystalEffectSettings.strikeColor(), r), j * (1.0F + r * 0.7F)); + float s = 1.0F + r * 0.8F; + L(worldRenderer, d, ex, q, m * s, p); + o++; + L(worldRenderer, d, ex, q, n * s, p); + } + + tessellator.draw(); + } + + static Vec3 L(Entity entity, float f) { + return new Vec3( + entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * fx, + entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * fx, + entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * fx + ); + } + + private static Vec3 L(Vec3 vec3, Vec3 vec31, float f, float g) { + return fx <= 0.0F ? vec3 : vec3.add(vec31.subtract(vec3).scale(fx * g)); + } + + public void L(EntityLivingBase entityLivingBase, float f, long l, float g, CrystalEffectSettings crystalEffectSettings, TargetESPState targetESPState) { + CrystalEffectRenderer crystalEffectRenderer1 = this; + Entity entity; + if ((entity = mc.getRenderViewEntity()) != null) { + Vec3 vec3 = new Vec3( + entity.prevPosX + (entity.posX - entity.prevPosX) * g, + entity.prevPosY + (entity.posY - entity.prevPosY) * g, + entity.prevPosZ + (entity.posZ - entity.prevPosZ) * g + ); + GlStateManager.pushMatrix(); + GlStateManager.disableLighting(); + GlStateManager.enableBlend(); + GlStateManager.disableDepth(); + GlStateManager.depthMask(false); + GlStateManager.disableCull(); + GlStateManager.disableAlpha(); + crystalEffectRenderer1.L(vec3, entityLivingBase, fx, l, g, crystalEffectSettings, targetESPState); + crystalEffectRenderer1.d(vec3, entityLivingBase, fx, l, g, crystalEffectSettings, targetESPState); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.enableAlpha(); + GlStateManager.enableCull(); + GlStateManager.depthMask(true); + GlStateManager.enableDepth(); + GlStateManager.disableBlend(); + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + } + } + + static { + float[][] o = new float[6][]; + boolean bl = true; + float[] g = new float[3]; + boolean bl1 = true; + g[0] = 0.0F; + g[1] = 1.5F; + g[2] = 0.0F; + o[0] = g; + float[] h = new float[3]; + bl1 = true; + h[0] = 0.0F; + h[1] = -1.5F; + h[2] = 0.0F; + o[1] = h; + float[] j = new float[3]; + bl1 = true; + j[0] = 1.0F; + j[1] = 0.0F; + j[2] = 0.0F; + o[2] = j; + float[] p = new float[3]; + boolean bl2 = true; + p[0] = -1.0F; + p[1] = 0.0F; + p[2] = 0.0F; + o[3] = p; + p = new float[3]; + bl2 = true; + p[0] = 0.0F; + p[1] = 0.0F; + p[2] = 1.0F; + o[4] = p; + p = new float[3]; + bl2 = true; + p[0] = 0.0F; + p[1] = 0.0F; + p[2] = -1.0F; + o[5] = p; + f = o; + int[][] ix = new int[8][]; + bl = true; + int[] k = new int[3]; + bl1 = true; + k[0] = 0; + k[1] = 4; + k[2] = 2; + ix[0] = k; + int[] l = new int[3]; + bl1 = true; + l[0] = 0; + l[1] = 3; + l[2] = 4; + ix[1] = l; + int[] m = new int[3]; + bl1 = true; + m[0] = 0; + m[1] = 5; + m[2] = 3; + ix[2] = m; + int[] n = new int[3]; + bl2 = true; + n[0] = 0; + n[1] = 2; + n[2] = 5; + ix[3] = n; + ix[4] = new int[]{1, 2, 4}; + ix[5] = new int[]{1, 4, 3}; + ix[6] = new int[]{1, 3, 5}; + ix[7] = new int[]{1, 5, 2}; + e = ix; + float[] fx = new float[8]; + bl = true; + fx[0] = 1.0F; + fx[1] = 0.8F; + fx[2] = 0.6F; + fx[3] = 0.9F; + fx[4] = 0.7F; + fx[5] = 0.5F; + fx[6] = 0.4F; + fx[7] = 0.6F; + i = fx; + } + + static void L(WorldRenderer worldRenderer, double d, double e, double f, float g, int i) { + g /= 2.0F; + float h = ActiveRenderInfo.getRotationX(); + float j = ActiveRenderInfo.getRotationXZ(); + float k = ActiveRenderInfo.getRotationZ(); + float l = ActiveRenderInfo.getRotationYZ(); + float m = ActiveRenderInfo.getRotationXY(); + int n = ColorUtils.red(ix); + int o = ColorUtils.green(ix); + int p = ColorUtils.blue(ix); + ix = ColorUtils.alpha(ix); + worldRenderer.pos(d - h * g - l * g, ex - j * g, fx - k * g - m * g).tex(0.0, 0.0).color(n, o, p, ix).endVertex(); + worldRenderer.pos(d - h * g + l * g, ex + j * g, fx - k * g + m * g).tex(0.0, 1.0).color(n, o, p, ix).endVertex(); + worldRenderer.pos(d + h * g + l * g, ex + j * g, fx + k * g + m * g).tex(1.0, 1.0).color(n, o, p, ix).endVertex(); + worldRenderer.pos(d + h * g - l * g, ex - j * g, fx + k * g - m * g).tex(1.0, 0.0).color(n, o, p, ix).endVertex(); + } + + private static float[] L(float[] f, Vec3 vec3) { + float r = (float)vec3.xCoord; + float g = (float)vec3.yCoord; + float h = (float)vec3.zCoord; + float s = -r; + g = g; + float ix; + if ((ix = h * h + s * s) < 1.0E-12F) { + if (g >= 0.0F) { + float[] w = new float[3]; + boolean bl1 = true; + w[0] = fx[0]; + w[1] = fx[1]; + w[2] = fx[2]; + return w; + } else { + float[] v = new float[3]; + boolean bl = true; + v[0] = fx[0]; + v[1] = -fx[1]; + v[2] = -fx[2]; + return v; + } + } else { + ix = (float)Math.sqrt(ix); + h /= ix; + float t = s / ix; + float j = fx[0]; + float k = fx[1]; + float l = fx[2]; + float m = -t * k; + float n = t * j - h * l; + float o = h * k; + float p = h * j + t * l; + float q = 1.0F - g; + float[] u = new float[3]; + boolean bl2 = true; + u[0] = j * g + m * ix + h * p * q; + u[1] = k * g + n * ix; + u[2] = l * g + o * ix + t * p * q; + return u; + } + } + + private void L( + Vec3 vec3, EntityLivingBase entityLivingBase, float f, long l, float g, CrystalEffectSettings crystalEffectSettings, TargetESPState targetESPState + ) { + GlStateManager.disableTexture2D(); + GlStateManager.blendFunc(770, 1); + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + worldRenderer.begin(4, DefaultVertexFormats.POSITION_COLOR); + Vec3 vec33 = L(entityLivingBase, g); + float h = TargetESPMath.d(entityLivingBase.width); + float ix = TargetESPMath.D(fx); + int j = TargetESPMath.L(crystalEffectSettings.crystalColor(), fx * crystalEffectSettings.crystal()); + Vec3 vec31 = vec33.addVector(0.0, entityLivingBase.height / 2.0F, 0.0); + + int k; + for (int ba = k = 0; ba < 18; ba = ++k) { + Vec3 vec32; + Vec3 vec34 = vec32 = L(vec33, entityLivingBase.height, k, h, ix, l, fx); + float v = targetESPState.L(k); + Vec3 vec35 = L(vec34, vec31, v, crystalEffectSettings.reach()); + double d = vec35.xCoord - vec3.xCoord; + double ex = vec35.yCoord - vec3.yCoord; + double n = vec35.zCoord - vec3.zCoord; + vec32 = new Vec3(vec31.xCoord - vec32.xCoord, vec31.yCoord - vec32.yCoord, vec31.zCoord - vec32.zCoord).normalize(); + int m = v <= 0.0F ? j : TargetESPMath.d(j, crystalEffectSettings.strikeColor(), v); + float o = 0.1F * (1.0F + v * 0.5F); + float w = 1.0F + v * 0.6F; + + int p; + for (int y = p = 0; y < e.length; y = ++p) { + int q = TargetESPMath.d(m, i[p] * w); + int[] r; + int s = (r = e[p]).length; + + int t; + for (int z = t = 0; z < s; z = t) { + int u = r[t]; + float[] x = L(f[u], vec32); + WorldRenderer worldRenderer1 = worldRenderer.pos(d + x[0] * o, ex + x[1] * o, n + x[2] * o); + int bb = ColorUtils.red(q); + int bc = ColorUtils.green(q); + int bd = ColorUtils.blue(q); + t++; + worldRenderer1.color(bb, bc, bd, ColorUtils.alpha(q)).endVertex(); + } + } + } + + tessellator.draw(); + } + + private static Vec3 L(Vec3 vec3, float f, int i, float g, float h, long l, float j) { + float m; + float k = (float)Math.sin(m = TargetESPMath.L(ix, l, j)) * g * h; + g = (float)Math.cos(m) * g * h; + fx = TargetESPMath.L(ix, fx); + return new Vec3(vec3.xCoord + k, vec3.yCoord + fx, vec3.zCoord + g); + } +} diff --git a/src/openonyx/render/group_k/CrystalEffectSettings.java b/src/openonyx/render/group_k/CrystalEffectSettings.java new file mode 100644 index 0000000..53897fe --- /dev/null +++ b/src/openonyx/render/group_k/CrystalEffectSettings.java @@ -0,0 +1,35 @@ +package openonyx.render.group_k; + +public record CrystalEffectSettings(float bloom, float size, float crystal, float reach, int crystalColor, int bloomColor, int strikeColor) { + public static String decrypt(String string) { + String string1 = string; + int n = (--3 ^ 5) << 4 ^ 10; + String string2; + int p = (string2 = string1).length(); + char[] e = new char[p]; + boolean bl = true; + int j; + int o = j = p - 1; + char[] c = e; + byte b = 59; + byte d = 117; + int k = o; + int i = n; + + while (k >= 0) { + int l = j; + int m = string2.charAt(j); + j--; + c[l] = (char)(m ^ i); + if (j < 0) { + break; + } + + m = j--; + c[m] = (char)(string2.charAt(m) ^ b); + k = j; + } + + return new String(c); + } +} diff --git a/src/openonyx/render/group_k/TargetESPMath.java b/src/openonyx/render/group_k/TargetESPMath.java new file mode 100644 index 0000000..7ff09ce --- /dev/null +++ b/src/openonyx/render/group_k/TargetESPMath.java @@ -0,0 +1,78 @@ +package openonyx.render.group_k; + +import openonyx.theme.internal.ColorUtils; + +public final class TargetESPMath { + public static final float j = 0.6F; + public static final float m = 1.5F; + public static final int h = 20; + public static final float l = 0.8F; + public static final float I = 0.7F; + public static final int d = 18; + public static final float i = 0.1F; + public static final float f = 0.6F; + public static final float H = 0.2F; + public static final float e = 0.5F; + + public static float L(int i, long l, float f) { + return (float)Math.toRadians(ix * 20 + L(lx, fx) * 0.3F); + } + + public static float L(float f, float g) { + return fx * L(g); + } + + public static float D(float f) { + return 1.25F - 0.5F * L(fx); + } + + public static float L(long l, float f) { + return (float)(lx % 360000L) / 2.5F + fx; + } + + public static float d(float f) { + return fx * 1.5F; + } + + public static int d(int i, float f) { + return ColorUtils.argb( + ColorUtils.alpha(ix), + Math.min(255, (int)(ColorUtils.red(ix) * fx)), + Math.min(255, (int)(ColorUtils.green(ix) * fx)), + Math.min(255, (int)(ColorUtils.blue(ix) * fx)) + ); + } + + public static float L(float f) { + return Math.clamp(fx, 0.0F, 1.0F); + } + + public static float L(int i, float f) { + int jx = ix; + ix = jx * 20; + return 0.1F + fx * Math.abs((float)Math.sin(ix)); + } + + public static int d(int i, int j, float f) { + fx = L(fx); + return ColorUtils.argb( + ColorUtils.alpha(ix), + L(ColorUtils.red(ix), ColorUtils.red(jx), fx), + L(ColorUtils.green(ix), ColorUtils.green(jx), fx), + L(ColorUtils.blue(ix), ColorUtils.blue(jx), fx) + ); + } + + public static int L(int i, float f) { + int jx = ix; + float g = ColorUtils.alpha(jx) / 255.0F; + return ColorUtils.withAlpha(jx, g * L(fx)); + } + + private TargetESPMath() { + } + + private static int L(int i, int j, float f) { + return Math.clamp(Math.round(ix + (jx - ix) * fx), 0, 255); + } +} diff --git a/src/openonyx/render/group_k/TargetESPRenderer.java b/src/openonyx/render/group_k/TargetESPRenderer.java new file mode 100644 index 0000000..c1a6a9a --- /dev/null +++ b/src/openonyx/render/group_k/TargetESPRenderer.java @@ -0,0 +1,433 @@ +package openonyx.render.group_k; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; +import openonyx.core.MinecraftAccess; +import openonyx.theme.internal.ColorUtils; +import org.lwjgl.opengl.GL11; + +public final class TargetESPRenderer implements MinecraftAccess { + private float c; + private static final int a = 400; + private static final float[] k; + private static final int g = 24; + private float M; + private static final float[] L; + private boolean j; + private final List targetESPRendererParts = new ArrayList<>(); + private static final int h = 160; + private final Random random = new Random(); + private float I; + private static final float d = 130.0F; + private static final int i = 96; + private float f; + private static final ResourceLocation RESOURCE_LOCATION = new ResourceLocation("onyx", "textures/effect/target_bloom.png"); + private int e; + + private static int d(int i, int j, float f) { + float gx; + float hx = gx = Math.clamp(fx, 0.0F, 1.0F); + fx = hx * hx * (3.0F - 2.0F * gx); + return ColorUtils.argb( + L(ColorUtils.alpha(ix), ColorUtils.alpha(jx), fx), + L(ColorUtils.red(ix), ColorUtils.red(jx), fx), + L(ColorUtils.green(ix), ColorUtils.green(jx), fx), + L(ColorUtils.blue(ix), ColorUtils.blue(jx), fx) + ); + } + + private void L(float[] f, Vec3 vec3, float g, float h) { + TargetESPRenderer targetESPRenderer1 = this; + if (!targetESPRenderer1.targetESPRendererParts.isEmpty()) { + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + mc.getTextureManager().bindTexture(RESOURCE_LOCATION); + GL11.glTexParameteri(3553, 10241, 9729); + GL11.glTexParameteri(3553, 10240, 9729); + GlStateManager.blendFunc(770, 1); + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR); + Iterator iterator; + Iterator iterator1 = iterator = targetESPRenderer1.targetESPRendererParts.iterator(); + + while (iterator1.hasNext()) { + TargetESPRendererPart targetESPRendererPart = (TargetESPRendererPart)iterator.next(); + float ix; + if ((ix = 1.0F - (float)targetESPRendererPart.g / Math.max(1, targetESPRendererPart.j)) <= 0.0F) { + iterator1 = iterator; + } else { + double dx = targetESPRendererPart.k + (targetESPRendererPart.M - targetESPRendererPart.k) * gx - vec3.xCoord; + double ex = targetESPRendererPart.e + (targetESPRendererPart.i - targetESPRendererPart.e) * gx - vec3.yCoord; + double jx = targetESPRendererPart.d + (targetESPRendererPart.l - targetESPRendererPart.d) * gx - vec3.zCoord; + float kx = 0.72F + 0.28F * (float)Math.sin((targetESPRendererPart.g + targetESPRendererPart.h) * 0.7F); + kx = hx * ix * kx * 0.82F; + ix = targetESPRendererPart.I * (0.75F + ix * 0.45F); + iterator1 = iterator; + CrystalEffectRenderer.L(worldRenderer, dx, ex, jx, ix * 5.4F * 2.0F, targetESPRenderer1.L(fx, targetESPRendererPart.h, kx * 0.24F)); + CrystalEffectRenderer.L(worldRenderer, dx, ex, jx, ix * 2.0F, targetESPRenderer1.L(fx, targetESPRendererPart.h, kx)); + } + } + + tessellator.draw(); + } + } + + private float d(float f) { + return (float)((Math.sin(Math.toRadians(fx + this.c)) + 1.0) * 0.5); + } + + private void L(float[] f, double d, double e, double g, float h, float i, float j) { + TargetESPRenderer targetESPRenderer1 = this; + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + int n = 0; + worldRenderer.begin(3, DefaultVertexFormats.POSITION_COLOR); + + for (int m = 0; n <= 160; n = m) { + float kx; + double l = Math.toRadians(kx = m / 160.0F * 360.0F); + double o = dx + Math.cos(l) * hx; + double p = gx + Math.sin(l) * hx; + int q = (int)(kx + ix); + m++; + L(worldRenderer, o, ex, p, targetESPRenderer1.L(fx, q, jx)); + } + + tessellator.draw(); + } + + private void L(float[] f, double d, double e, double g, float h, float i, float j, float k) { + TargetESPRenderer targetESPRenderer1 = this; + GlStateManager.disableTexture2D(); + GlStateManager.blendFunc(770, 1); + GlStateManager.shadeModel(7425); + int m; + if (kx > 0.0F) { + for (int n = m = 0; n < k.length; n = ++m) { + float l; + if (!((l = L[m] * kx) <= 0.0F)) { + targetESPRenderer1.L(fx, dx, ex, gx, hx, ix, jx * Math.min(1.0F, l), (double)(hx * k[m])); + } + } + } + + GL11.glEnable(2848); + GL11.glHint(3154, 4354); + GL11.glLineWidth(1.4F); + targetESPRenderer1.L(fx, dx, ex, gx, hx, ix, jx); + GL11.glLineWidth(1.0F); + GL11.glDisable(2848); + GlStateManager.shadeModel(7424); + } + + private static void L(WorldRenderer worldRenderer, double d, double e, double f, int i) { + worldRenderer.pos(dx, ex, fx).color(ColorUtils.red(ix), ColorUtils.green(ix), ColorUtils.blue(ix), ColorUtils.alpha(ix)).endVertex(); + } + + private int L(float[] f, int i, float g) { + int kx = Math.clamp((int)(255.0F * gx), 0, 255); + int jx = ColorUtils.hsvToArgb(fx[0] + (this.j ? ix : 0), fx[1], fx[2], kx); + return this.I <= 0.0F ? jx : d(jx, ColorUtils.argb(kx, 255, 32, 32), this.I); + } + + private void L(float[] f, double d, double e, double g, float h, float i, float j, float k, float l) { + TargetESPRenderer targetESPRenderer1 = this; + if (!(kx <= 0.0F)) { + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + l = 130.0F * l; + GlStateManager.disableTexture2D(); + GlStateManager.blendFunc(770, 1); + GlStateManager.shadeModel(7425); + + int m; + for (int x = m = 0; x < 24; x = m) { + double n = ex + hx * targetESPRenderer1.d(jx - l * m / 24.0F); + double o = ex + hx * targetESPRenderer1.d(jx - l * (m + 1) / 24.0F); + float p = L(m / 24.0F); + float q = L((m + 1) / 24.0F); + x = 0; + worldRenderer.begin(5, DefaultVertexFormats.POSITION_COLOR); + + for (int r = 0; x <= 96; x = r) { + float v; + double s = Math.toRadians(v = r / 96.0F * 360.0F); + double t = dx + Math.cos(s) * ix; + s = gx + Math.sin(s) * ix; + float u = L(v, jx); + int w = (int)(v + jx); + L(worldRenderer, t, n, s, targetESPRenderer1.L(fx, w, kx * p * u)); + float y = kx * q; + r++; + L(worldRenderer, t, o, s, targetESPRenderer1.L(fx, w, y * u)); + } + + m++; + tessellator.draw(); + } + + GlStateManager.shadeModel(7424); + } + } + + static { + float[] fx = new float[3]; + boolean bl = true; + fx[0] = 0.3F; + fx[1] = 0.13F; + fx[2] = 0.05F; + k = fx; + fx = new float[3]; + bl = true; + fx[0] = 0.16F; + fx[1] = 0.26F; + fx[2] = 0.42F; + L = fx; + } + + public void d() { + this.targetESPRendererParts.clear(); + this.I = 0.0F; + this.e = 0; + this.M = 0.0F; + this.f = 0.0F; + } + + public void d(EntityLivingBase entityLivingBase, float f, TargetESPStyle targetESPStyle) { + this.c = targetESPStyle.startPhase(); + if (entityLivingBase == null) { + this.d(); + } else { + this.L(entityLivingBase, targetESPStyle); + this.f = this.M; + this.M = this.M + targetESPStyle.speed() * 6.0F; + this.L(); + if (targetESPStyle.particles() && this.targetESPRendererParts.size() < 400) { + int ix = (int)((3 + this.random.nextInt(4)) * Math.max(0.15F, fx)); + + int jx; + for (int kx = jx = 0; kx < ix && this.targetESPRendererParts.size() < 400; kx = jx) { + jx++; + this.L(entityLivingBase, fx, targetESPStyle); + } + } + } + } + + private static float L(float f) { + float gx = fx; + float hx = fx = 1.0F - gx; + return hx * hx * fx * 0.55F; + } + + private void L(EntityLivingBase entityLivingBase, TargetESPStyle targetESPStyle) { + if (targetESPStyle.redOnImpact() && entityLivingBase != null) { + int ix; + TargetESPRenderer targetESPRenderer1; + if ((ix = entityLivingBase.hurtTime) <= this.e && (ix <= 0 || this.e != 0)) { + if (ix > 0) { + this.I = Math.min(targetESPStyle.impactIntensity(), this.I + targetESPStyle.impactFadeIn() * 0.5F); + targetESPRenderer1 = this; + } else { + this.I = Math.max(0.0F, this.I - targetESPStyle.impactFadeOut()); + targetESPRenderer1 = this; + } + } else { + targetESPRenderer1 = this; + this.I = Math.min(targetESPStyle.impactIntensity(), this.I + targetESPStyle.impactFadeIn()); + } + + targetESPRenderer1.e = ix; + } else { + this.I = 0.0F; + this.e = 0; + } + } + + public void L(EntityLivingBase entityLivingBase, float f, float g, TargetESPStyle targetESPStyle) { + TargetESPRenderer targetESPRenderer1 = this; + Entity entity; + if ((entity = mc.getRenderViewEntity()) != null) { + Vec3 vec31 = new Vec3( + entity.prevPosX + (entity.posX - entity.prevPosX) * gx, + entity.prevPosY + (entity.posY - entity.prevPosY) * gx, + entity.prevPosZ + (entity.posZ - entity.prevPosZ) * gx + ); + targetESPRenderer1.j = targetESPStyle.gradient(); + targetESPRenderer1.c = targetESPStyle.startPhase(); + float hx = 0.72F + 0.28F * fx; + hx = (entityLivingBase.width * 0.86F + 0.18F) * targetESPStyle.size() * hx; + float ix = targetESPRenderer1.f + (targetESPRenderer1.M - targetESPRenderer1.f) * gx; + fx *= fx; + Vec3 vec3 = CrystalEffectRenderer.L(entityLivingBase, gx); + double dx = vec3.xCoord - vec31.xCoord; + double ex; + double jx = (ex = vec3.yCoord - vec31.yCoord) + entityLivingBase.height * targetESPRenderer1.d(ix); + double kx = vec3.zCoord - vec31.zCoord; + float[] l = ColorUtils.toRgbFloats(targetESPStyle.color()); + GlStateManager.pushMatrix(); + GlStateManager.enableBlend(); + GlStateManager.disableCull(); + GlStateManager.disableLighting(); + GlStateManager.disableAlpha(); + GlStateManager.enableDepth(); + GlStateManager.depthMask(false); + if (targetESPStyle.trail()) { + targetESPRenderer1.L(l, dx, ex, kx, entityLivingBase.height, hx, ix, fx * targetESPStyle.trailOpacity(), targetESPStyle.trailLength()); + } + + targetESPRenderer1.L(l, dx, jx, kx, hx, ix, fx * 0.92F, targetESPStyle.glow()); + if (targetESPStyle.particles()) { + targetESPRenderer1.L(l, vec31, gx, fx); + } + + GlStateManager.depthMask(true); + GlStateManager.enableAlpha(); + GlStateManager.enableCull(); + GlStateManager.disableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GlStateManager.blendFunc(770, 771); + GlStateManager.enableTexture2D(); + GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + } + } + + private void L() { + TargetESPRenderer targetESPRenderer1 = this; + Iterator iterator = targetESPRenderer1.targetESPRendererParts.iterator(); + + while (iterator.hasNext()) { + TargetESPRendererPart targetESPRendererPart; + TargetESPRendererPart targetESPRendererPart1 = targetESPRendererPart = (TargetESPRendererPart)iterator.next(); + targetESPRendererPart1.k = targetESPRendererPart1.M; + targetESPRendererPart1.e = targetESPRendererPart1.i; + targetESPRendererPart1.d = targetESPRendererPart1.l; + targetESPRendererPart1.M = targetESPRendererPart1.M + targetESPRendererPart.L; + targetESPRendererPart1.i = targetESPRendererPart1.i + targetESPRendererPart.H; + targetESPRendererPart1.l = targetESPRendererPart1.l + targetESPRendererPart.f; + targetESPRendererPart1.L *= 0.96; + targetESPRendererPart1.H -= 0.0022; + targetESPRendererPart1.f *= 0.96; + targetESPRendererPart1.g++; + if (targetESPRendererPart1.g >= targetESPRendererPart.j || targetESPRendererPart.i < targetESPRendererPart.m) { + iterator.remove(); + } + } + } + + private static int L(int i, int j, float f) { + return (int)(ix + (jx - ix) * fx); + } + + private void L(float[] f, double d, double e, double g, float h, float i, float j, double k) { + TargetESPRenderer targetESPRenderer1 = this; + Tessellator tessellator; + WorldRenderer worldRenderer = (tessellator = Tessellator.getInstance()).getWorldRenderer(); + + byte b; + for (int v = b = -1; v <= 1; v = b) { + v = 0; + worldRenderer.begin(5, DefaultVertexFormats.POSITION_COLOR); + + for (int l = 0; v <= 160; v = l) { + double m; + float t; + double n = Math.cos(m = Math.toRadians(t = l / 160.0F * 360.0F)); + m = Math.sin(m); + double p = dx + n * hx; + double q = gx + m * hx; + double r = -n * ex; + n = n * p + m * q; + m = -m * ex; + double s; + if ((s = Math.sqrt(r * r + n * n + m * m)) < 1.0E-6) { + r = 0.0; + n = 1.0; + m = 0.0; + s = 1.0; + } + + r = r / s * kx * b; + n = n / s * kx * b; + m = m / s * kx * b; + int o = targetESPRenderer1.L(fx, (int)(t + ix), jx); + int u = targetESPRenderer1.L(fx, (int)(t + ix), 0.0F); + L(worldRenderer, p, ex, q, o); + double w = p + r; + double x = ex + n; + l++; + L(worldRenderer, w, x, q + m, u); + } + + b += 2; + tessellator.draw(); + } + } + + private static float L(float f, float g) { + double dx = Math.sin(Math.toRadians(fx * 3.0F + gx * 1.3F)); + double ex = Math.sin(Math.toRadians(fx * 7.0F - gx * 0.6F)); + return (float)(0.4 + 0.6 * (0.5 + 0.5 * dx) * (0.65 + 0.35 * ex)); + } + + private void L(EntityLivingBase entityLivingBase, float f, TargetESPStyle targetESPStyle) { + float gx = (entityLivingBase.width * 0.86F + 0.18F) * targetESPStyle.size() * fx; + float hx = this.d(this.M); + double dx = entityLivingBase.posX; + double ex = entityLivingBase.posY + 0.03; + double ix; + double jx = ex + ((ix = entityLivingBase.posY + entityLivingBase.height - 0.03) - ex) * hx; + double kx = entityLivingBase.posZ; + double l = this.random.nextDouble() * Math.PI * 2.0; + double m = gx * (0.88 + this.random.nextDouble() * 0.22); + double n = entityLivingBase.height * targetESPStyle.particleHeight(); + double x; + if (targetESPStyle.particleHeight() >= 0.98F) { + double o; + x = o = ex + this.random.nextDouble() * (ix - ex); + } else { + double p = n * 0.5; + double s = jx + (this.random.nextDouble() - 0.5) * n; + double q = Math.max(ex, jx - p); + double r; + if ((r = Math.min(ix, jx + p)) > q) { + s = Math.max(q, Math.min(r, s)); + } + + x = s; + } + + double t = x + (this.random.nextDouble() - 0.5) * 0.025; + t = Math.max(ex, Math.min(ix, t)); + double u = Math.cos(l); + double v = Math.sin(l); + double w = (this.random.nextDouble() - 0.5) * 0.01; + TargetESPRendererPart targetESPRendererPart = new TargetESPRendererPart( + dx + u * m, + t, + kx + v * m, + u * w, + -8.0E-4 - this.random.nextDouble() * 0.006, + v * w, + ex - 0.08, + Math.max(1, (int)((34 + this.random.nextInt(28)) * targetESPStyle.particleLife())), + (0.0065F + this.random.nextFloat() * 0.014F) * targetESPStyle.size() * fx, + this.random.nextInt(360) + ); + this.targetESPRendererParts.add(targetESPRendererPart); + } +} diff --git a/src/openonyx/render/group_k/TargetESPRendererPart.java b/src/openonyx/render/group_k/TargetESPRendererPart.java new file mode 100644 index 0000000..e64d41d --- /dev/null +++ b/src/openonyx/render/group_k/TargetESPRendererPart.java @@ -0,0 +1,34 @@ +package openonyx.render.group_k; + +final class TargetESPRendererPart { + private double k; + private int g; + private double M; + private double L; + private final int j; + private final double m; + private final int h; + private double l; + private final float I; + private double d; + private double i; + private double f; + private double H; + private double e; + + private TargetESPRendererPart(double d, double e, double f, double g, double h, double i, double j, int k, float l, int m) { + this.k = dx; + this.e = ex; + this.d = fx; + this.M = dx; + this.i = ex; + this.l = fx; + this.L = gx; + this.H = hx; + this.f = ix; + this.m = jx; + this.j = kx; + this.I = lx; + this.h = mx; + } +}