From 629f4e171d657bc380eaf69b3b2e4526b54cfc08 Mon Sep 17 00:00:00 2001 From: winterflyt <36+winterflyt@noreply.skidsolutions.xyz> Date: Mon, 30 Nov 2026 05:59:24 +0200 Subject: [PATCH] Upload files to "src/openonyx/features/render" --- src/openonyx/features/render/TargetESP.java | 190 ++++++++++++++++++ .../features/render/TargetESPPart.java | 48 +++++ .../features/render/TargetESPPart2.java | 23 +++ .../features/render/TargetESPStyle2.java | 27 +++ src/openonyx/features/render/TargetsMode.java | 14 ++ 5 files changed, 302 insertions(+) create mode 100644 src/openonyx/features/render/TargetESP.java create mode 100644 src/openonyx/features/render/TargetESPPart.java create mode 100644 src/openonyx/features/render/TargetESPPart2.java create mode 100644 src/openonyx/features/render/TargetESPStyle2.java create mode 100644 src/openonyx/features/render/TargetsMode.java diff --git a/src/openonyx/features/render/TargetESP.java b/src/openonyx/features/render/TargetESP.java new file mode 100644 index 0000000..f82ca1e --- /dev/null +++ b/src/openonyx/features/render/TargetESP.java @@ -0,0 +1,190 @@ +package openonyx.features.render; + +import meteordevelopment.orbit.EventHandler; +import net.minecraft.entity.EntityLivingBase; +import openonyx.configuration.internal.AttackEvent; +import openonyx.configuration.internal.TickEndEvent; +import openonyx.configuration.internal.WorldChangeEvent; +import openonyx.core.OnyxClient; +import openonyx.features.Module; +import openonyx.features.ModuleCategory; +import openonyx.history.internal.ColorSetting; +import openonyx.history.internal.EnumSetting; +import openonyx.history.internal.NumberSetting; +import openonyx.render.group_k.CrystalEffectRenderer; +import openonyx.render.group_k.CrystalEffectSettings; +import openonyx.render.group_k.TargetESPRenderer; +import openonyx.render.group_k.TargetESPState; +import openonyx.render.group_k.TargetESPStyle; +import openonyx.render.group_k.Transition; + +public final class TargetESP extends Module { + private final CrystalEffectRenderer crystalEffectRenderer; + private final TargetESPRenderer targetESPRenderer; + private static final float M = 100.0F; + public NumberSetting glowSize; + public TargetESPPart2 targetESPPart2; + public EnumSetting style = new EnumSetting<>("Style", TargetESPStyle2.CRYSTALS); + private long h; + public ColorSetting color = new ColorSetting("Color", -8857601).D().describe("Colour of the mark on the target"); + private final TargetESPState targetESPState; + private final Transition transition; + public NumberSetting crystalOpacity; + public TargetESPPart targetESPPart; + public ColorSetting glowColor = new ColorSetting("Glow color", -8857601) + .visibleWhen(this.style, targetESPStyle2 -> targetESPStyle2 == TargetESPStyle2.CRYSTALS) + .describe("Colour of the halo around each shard"); + public NumberSetting glow = new NumberSetting("Glow", 75.0, 0.0, 300.0, 5.0) + .withSuffix("%") + .visibleWhen(this.style, targetESPStyle2 -> targetESPStyle2 == TargetESPStyle2.CRYSTALS) + .describe("How much light the halos throw"); + + @EventHandler + private void onWorldChange(WorldChangeEvent worldChangeEvent) { + this.h(); + } + + private TargetESPStyle L() { + return new TargetESPStyle( + this.color.getOpaque(), + this.targetESPPart.size.getFloat(), + this.targetESPPart.speed.getFloat(), + this.targetESPPart.start.getValue().L(), + this.targetESPPart.glow.getFloat() / 100.0F, + this.targetESPPart.gradient.isEnabled(), + this.targetESPPart.trail.isEnabled(), + this.targetESPPart.trailLength.getFloat(), + this.targetESPPart.trailOpacity.getFloat() / 100.0F, + this.targetESPPart.particles.isEnabled(), + this.targetESPPart.particleHeight.getFloat(), + this.targetESPPart.particleLife.getFloat(), + this.targetESPPart.redOnImpact.isEnabled(), + this.targetESPPart.impactFadeIn.getFloat(), + this.targetESPPart.impactFadeOut.getFloat(), + this.targetESPPart.impactIntensity.getFloat() + ); + } + + private EntityLivingBase L() { + if (mc.theWorld != null && mc.thePlayer != null) { + EntityLivingBase entityLivingBase; + return (entityLivingBase = OnyxClient.moduleManager.killAura.getTarget()) != null + && entityLivingBase.isEntityAlive() + && entityLivingBase.worldObj == mc.theWorld + ? entityLivingBase + : null; + } else { + return null; + } + } + + public void L(float f) { + TargetESP targetESP1 = this; + if (targetESP1.isEnabled()) { + long l = System.nanoTime(); + float hx = targetESP1.h == 0L ? 0.0F : Math.min((float)(l - targetESP1.h) / 1000000.0F, 100.0F); + targetESP1.h = l; + TargetESP targetESP2; + if (targetESP1.h()) { + targetESP1.targetESPState.L(hx); + targetESP2 = targetESP1; + } else { + targetESP1.targetESPState.L(); + targetESP2 = targetESP1; + } + + EntityLivingBase entityLivingBase1 = targetESP2.L(); + targetESP1.transition.L(entityLivingBase1, hx); + EntityLivingBase entityLivingBase; + EntityLivingBase entityLivingBase2 = entityLivingBase = targetESP1.transition.d(); + float g = targetESP1.transition.L(); + if (entityLivingBase2 != null && !(g <= 0.0F) && entityLivingBase.worldObj == mc.theWorld) { + if (targetESP1.style.is(TargetESPStyle2.RING)) { + targetESP1.targetESPRenderer.L(entityLivingBase, g, f, targetESP1.L()); + } else { + targetESP1.crystalEffectRenderer.L(entityLivingBase, g, System.currentTimeMillis(), f, targetESP1.L(), targetESP1.targetESPState); + } + } + } + } + + @Override + protected void onEnable() { + this.h(); + } + + @EventHandler + private void onAttack(AttackEvent attackEvent) { + if (this.h() && attackEvent.getEntityPlayer() == mc.thePlayer) { + if (attackEvent.getEntity() == this.transition.d()) { + this.targetESPState.L(this.targetESPPart2.shardsPerHit.getInt(), this.targetESPPart2.speed.getFloat() / 100.0F); + } + } + } + + @EventHandler + private void onTickEnd(TickEndEvent tickEndEvent) { + if (this.style.is(TargetESPStyle2.RING)) { + EntityLivingBase entityLivingBase = this.transition.d(); + EntityLivingBase entityLivingBase1; + TargetESP targetESP1; + if (entityLivingBase != null && entityLivingBase.worldObj == mc.theWorld) { + entityLivingBase1 = entityLivingBase; + targetESP1 = this; + } else { + entityLivingBase1 = null; + targetESP1 = this; + } + + this.targetESPRenderer.d(entityLivingBase1, targetESP1.transition.L(), this.L()); + } + } + + private boolean h() { + return this.style.is(TargetESPStyle2.CRYSTALS) && this.targetESPPart2.isEnabled(); + } + + @Override + protected void onDisable() { + this.h(); + } + + private void h() { + this.transition.L(); + this.targetESPState.L(); + this.targetESPRenderer.d(); + this.h = 0L; + } + + private CrystalEffectSettings L() { + return new CrystalEffectSettings( + this.glow.getFloat() / 100.0F, + this.glowSize.getFloat() / 100.0F, + this.crystalOpacity.getFloat() / 100.0F, + this.targetESPPart2.reach.getFloat() / 100.0F, + this.color.getOpaque(), + this.glowColor.getOpaque(), + this.targetESPPart2.flash.getOpaque() + ); + } + + public TargetESP() { + super("TargetESP", "Marks the KillAura target", ModuleCategory.RENDER); + this.glowSize = new NumberSetting("Glow size", 70.0, 25.0, 300.0, 5.0) + .withSuffix("%") + .visibleWhen(this.style, targetESPStyle2 -> targetESPStyle2 == TargetESPStyle2.CRYSTALS) + .describe("Radius of each halo"); + this.crystalOpacity = new NumberSetting("Crystal opacity", 100.0, 0.0, 100.0, 5.0) + .withSuffix("%") + .visibleWhen(this.style, targetESPStyle2 -> targetESPStyle2 == TargetESPStyle2.CRYSTALS) + .describe("How solid the orbiting shards are"); + this.targetESPPart = new TargetESPPart(); + this.targetESPPart2 = new TargetESPPart2(); + this.transition = new Transition<>(); + this.targetESPState = new TargetESPState(); + this.crystalEffectRenderer = new CrystalEffectRenderer(); + this.targetESPRenderer = new TargetESPRenderer(); + this.targetESPPart.visibleWhen(() -> this.style.is(TargetESPStyle2.RING)); + this.targetESPPart2.visibleWhen(() -> this.style.is(TargetESPStyle2.CRYSTALS)); + } +} diff --git a/src/openonyx/features/render/TargetESPPart.java b/src/openonyx/features/render/TargetESPPart.java new file mode 100644 index 0000000..c3f1958 --- /dev/null +++ b/src/openonyx/features/render/TargetESPPart.java @@ -0,0 +1,48 @@ +package openonyx.features.render; + +import openonyx.history.SettingGroup; +import openonyx.history.internal.BooleanSetting; +import openonyx.history.internal.EnumSetting; +import openonyx.history.internal.NumberSetting; + +public final class TargetESPPart extends SettingGroup { + public NumberSetting size = new NumberSetting("Size", 1.0, 0.5, 2.0, 0.05).describe("How wide the hoop stands off the target"); + public NumberSetting impactFadeOut; + public BooleanSetting trail; + public NumberSetting impactIntensity; + public BooleanSetting redOnImpact; + public NumberSetting speed = new NumberSetting("Speed", 4.0, 0.5, 12.0, 0.5).describe("How fast it travels up and back down"); + public NumberSetting particleLife; + public BooleanSetting gradient; + public NumberSetting particleHeight; + public NumberSetting trailOpacity; + public BooleanSetting particles; + public EnumSetting start = new EnumSetting<>("Start", StartMode.FEET).describe("Where on the target the hoop sets off from"); + public NumberSetting trailLength; + public NumberSetting impactFadeIn; + public NumberSetting glow = new NumberSetting("Glow", 100.0, 0.0, 300.0, 10.0).withSuffix("%").describe("How much light comes off the line"); + + private TargetESPPart() { + super("Ring"); + this.gradient = new BooleanSetting("Gradient", false).describe("Walk the hue around the hoop instead of holding the picked colour"); + this.trail = new BooleanSetting("Trail", true).describe("Drag a curtain of light behind the hoop"); + this.trailLength = new NumberSetting("Trail length", 1.0, 0.25, 2.0, 0.05).describe("How far back the curtain reaches").visibleWhen(this.trail); + this.trailOpacity = new NumberSetting("Trail opacity", 100.0, 10.0, 300.0, 10.0) + .withSuffix("%") + .describe("How strongly the curtain is drawn") + .visibleWhen(this.trail); + this.particles = new BooleanSetting("Particles", true).describe("Shed glowing motes as the hoop goes"); + this.particleHeight = new NumberSetting("Particle height", 1.0, 0.1, 1.0, 0.05) + .describe("How much of the target's height the motes are spread over") + .visibleWhen(this.particles); + this.particleLife = new NumberSetting("Particle life", 1.0, 0.3, 3.0, 0.1) + .describe("How long a mote lasts before it is gone") + .visibleWhen(this.particles); + this.redOnImpact = new BooleanSetting("Red on impact", true).describe("Flush the ring red whenever the target is hit"); + this.impactFadeIn = new NumberSetting("Impact fade in", 0.3, 0.05, 1.0, 0.01).describe("How fast the flush comes on").visibleWhen(this.redOnImpact); + this.impactFadeOut = new NumberSetting("Impact fade out", 0.08, 0.01, 0.5, 0.01).describe("How fast it drains away again").visibleWhen(this.redOnImpact); + this.impactIntensity = new NumberSetting("Impact intensity", 1.0, 0.1, 1.0, 0.05) + .describe("How red it gets at its strongest") + .visibleWhen(this.redOnImpact); + } +} diff --git a/src/openonyx/features/render/TargetESPPart2.java b/src/openonyx/features/render/TargetESPPart2.java new file mode 100644 index 0000000..605131b --- /dev/null +++ b/src/openonyx/features/render/TargetESPPart2.java @@ -0,0 +1,23 @@ +package openonyx.features.render; + +import openonyx.history.SettingGroup; +import openonyx.history.internal.ColorSetting; +import openonyx.history.internal.NumberSetting; +import openonyx.theme.ThemeManager; + +public final class TargetESPPart2 extends SettingGroup { + public NumberSetting reach; + public ColorSetting flash; + public NumberSetting speed; + public NumberSetting shardsPerHit = new NumberSetting("Shards per hit", 1.0, 1.0, 6.0, 1.0).describe("How many shards lunge in on every hit"); + + private TargetESPPart2() { + super("Strike", true); + this.reach = new NumberSetting("Reach", 55.0, 10.0, 90.0, 5.0).withSuffix("%").describe("How far towards the target a shard drives in"); + this.speed = new NumberSetting("Speed", 100.0, 40.0, 250.0, 10.0).withSuffix("%").describe("Pace of the lunge and of the gap between shards"); + this.flash = new ColorSetting("Flash", -1) + .D() + .linkTo(() -> ThemeManager.getPalette().onPrimaryContainer()) + .describe("Colour a shard flashes to as it lands"); + } +} diff --git a/src/openonyx/features/render/TargetESPStyle2.java b/src/openonyx/features/render/TargetESPStyle2.java new file mode 100644 index 0000000..99aaf6e --- /dev/null +++ b/src/openonyx/features/render/TargetESPStyle2.java @@ -0,0 +1,27 @@ +package openonyx.features.render; + +import openonyx.history.DisplayNamed; + +public enum TargetESPStyle2 implements DisplayNamed { + CRYSTALS("Crystals"), + RING("Ring"); + + private final String H; + + TargetESPStyle2(String string1) { + this.H = string1; + } + + private static TargetESPStyle2[] L() { + TargetESPStyle2[] targetESPStyle2s = new TargetESPStyle2[2]; + boolean bl = true; + targetESPStyle2s[0] = CRYSTALS; + targetESPStyle2s[1] = RING; + return targetESPStyle2s; + } + + @Override + public String getDisplayName() { + return this.H; + } +} diff --git a/src/openonyx/features/render/TargetsMode.java b/src/openonyx/features/render/TargetsMode.java new file mode 100644 index 0000000..377ec18 --- /dev/null +++ b/src/openonyx/features/render/TargetsMode.java @@ -0,0 +1,14 @@ +package openonyx.features.render; + +public enum TargetsMode { + PLAYERS, + SELF; + + private static TargetsMode[] L() { + TargetsMode[] targetsModes = new TargetsMode[2]; + boolean bl = true; + targetsModes[0] = SELF; + targetsModes[1] = PLAYERS; + return targetsModes; + } +}