Upload files to "src/openonyx/features/render"

This commit is contained in:
winterflyt committed 2026-11-30 05:58:19 +02:00
1 parent 30e37a5641
commit 68c33bf212
5 files changed
+193

No files matched your search

@@ -0,0 +1,38 @@
package openonyx.features.render;
import java.util.function.BooleanSupplier;
import openonyx.history.SettingGroup;
import openonyx.history.internal.BooleanSetting;
import openonyx.history.internal.ColorSetting;
import openonyx.history.internal.NumberSetting;
public final class GlintEffect extends SettingGroup {
public final NumberSetting fill;
public final BooleanSetting outlineOnly;
public final NumberSetting smoothing;
public final NumberSetting glow;
public final ColorSetting color2;
public final NumberSetting outline;
public final ColorSetting color = new ColorSetting("Color", -3105793).D();
public final NumberSetting padding;
public final NumberSetting alpha;
public final NumberSetting speed;
public GlintEffect visibleWhen(BooleanSupplier booleanSupplier) {
super.visibleWhen(booleanSupplier);
return this;
}
private GlintEffect() {
super("Glint");
this.color2 = new ColorSetting("Color 2", -6559745).D().L(14.0).describe("When following the accent, shifted slightly so the glint keeps a gradient");
this.alpha = new NumberSetting("Alpha", 100.0, 0.0, 100.0, 5.0).withSuffix("%");
this.outlineOnly = new BooleanSetting("Outline only", false);
this.outline = new NumberSetting("Outline", 2.0, 0.0, 8.0, 0.5).withSuffix(" px");
this.glow = new NumberSetting("Glow", 125.0, 0.0, 200.0, 5.0).withSuffix("%");
this.fill = new NumberSetting("Fill", 35.0, 0.0, 200.0, 5.0).withSuffix("%").visibleWhen(() -> !this.outlineOnly.isEnabled());
this.padding = new NumberSetting("Padding", 16.0, 0.0, 20.0, 1.0).withSuffix(" px").describe("Distance the glint sits away from the item");
this.smoothing = new NumberSetting("Smoothing", 30.0, 0.0, 32.0, 0.5).withSuffix(" px").describe("Softens the silhouette before the glint traces it");
this.speed = new NumberSetting("Speed", 1.0, 0.1, 5.0, 0.05).withSuffix("x");
}
}
+93
View File
@@ -0,0 +1,93 @@
package openonyx.features.render;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import openonyx.core.OnyxClient;
import openonyx.events.TargetType;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.features.ModuleManager;
import openonyx.history.internal.EnumSetting;
import openonyx.history.internal.NumberSetting;
public class GlowESP extends Module {
private static final String l = "onyx_glow_outline";
private static final String I = "entity_outline";
public NumberSetting intensity;
private static final String i = "onyx_glow_fill";
public final GlowESPPart3 glowESPPart3 = new GlowESPPart3();
public NumberSetting radius;
public EnumSetting<GlowESPMode> mode = new EnumSetting<>("Mode", GlowESPMode.OUTLINE);
public static String i() {
GlowESP glowESP;
if ((glowESP = L()) == null || !glowESP.isEnabled()) {
return "entity_outline";
} else {
return glowESP.h() ? "onyx_glow_fill" : "onyx_glow_outline";
}
}
public static boolean d(EntityLivingBase entityLivingBase) {
EntityLivingBase entityLivingBase1 = entityLivingBase;
GlowESP glowESP;
return (glowESP = L()) != null && glowESP.L(entityLivingBase1);
}
public boolean h() {
return this.isEnabled() && this.mode.is(GlowESPMode.FILL);
}
public GlowESPPart L(EntityLivingBase entityLivingBase) {
if (!this.isEnabled()) {
return null;
}
TargetType targetType;
if ((targetType = TargetType.L(entityLivingBase)) == null) {
return null;
}
GlowESPPart glowESPPart;
return (glowESPPart = this.glowESPPart3.L(targetType)).isEnabled() ? glowESPPart : null;
}
public boolean L(EntityLivingBase entityLivingBase) {
return this.L(entityLivingBase) != null;
}
public static GlowESP L() {
ModuleManager moduleManager = OnyxClient.moduleManager;
return OnyxClient.moduleManager == null ? null : moduleManager.glowESP;
}
public static int L(EntityLivingBase entityLivingBase) {
EntityLivingBase entityLivingBase1 = entityLivingBase;
GlowESP glowESP;
GlowESPPart glowESPPart = (glowESP = L()) == null ? null : glowESP.L(entityLivingBase1);
return glowESPPart == null ? 16777215 : glowESPPart.color.getOpaque() & 16777215;
}
public GlowESP() {
super("GlowESP", "Outline glow or liquid-metal fill for selected entities", ModuleCategory.RENDER);
this.radius = new NumberSetting("Radius", 14.0, 2.0, 24.0, 1.0)
.withSuffix(" px")
.describe("How far the glow spreads around the entity")
.visibleWhen(this.mode, glowESPMode -> glowESPMode == GlowESPMode.OUTLINE);
this.intensity = new NumberSetting("Intensity", 40.0, 10.0, 100.0, 5.0).withSuffix("%").describe("Opacity of the outer glow");
}
public static boolean L(Entity entity) {
Entity entity1 = entity;
GlowESP glowESP;
return (glowESP = L()) == null || !glowESP.isEnabled()
? entity1 instanceof EntityPlayer
: entity1 instanceof EntityLivingBase && glowESP.L((EntityLivingBase)entity1);
}
public static boolean I() {
GlowESP glowESP;
return (glowESP = L()) != null && glowESP.isEnabled();
}
}
@@ -0,0 +1,14 @@
package openonyx.features.render;
public enum GlowESPMode {
OUTLINE,
FILL;
private static GlowESPMode[] L() {
GlowESPMode[] glowESPModes = new GlowESPMode[2];
boolean bl = true;
glowESPModes[0] = OUTLINE;
glowESPModes[1] = FILL;
return glowESPModes;
}
}
@@ -0,0 +1,16 @@
package openonyx.features.render;
import openonyx.history.SettingSection;
import openonyx.history.internal.ColorSetting;
public final class GlowESPPart extends SettingSection {
public final ColorSetting color;
private GlowESPPart(String string, boolean bl, int i, boolean bl1) {
super(string, bl);
this.color = new ColorSetting("Color", i);
if (bl1) {
this.color.D();
}
}
}
@@ -0,0 +1,32 @@
package openonyx.features.render;
import openonyx.events.TargetType;
// $VF: synthetic class
class GlowESPPart2 {
static {
int[] i = new int[TargetType.values().length];
boolean bl = true;
e = i;
try {
e[TargetType.SELF.ordinal()] = 1;
} catch (NoSuchFieldError noSuchFieldError3) {
}
try {
e[TargetType.ENEMY.ordinal()] = 2;
} catch (NoSuchFieldError noSuchFieldError2) {
}
try {
e[TargetType.TEAM.ordinal()] = 3;
} catch (NoSuchFieldError noSuchFieldError1) {
}
try {
e[TargetType.MOBS.ordinal()] = 4;
} catch (NoSuchFieldError noSuchFieldError) {
}
}
}