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

This commit is contained in:
winterflyt committed 2026-11-30 05:58:59 +02:00
1 parent f51d2e6eb9
commit 6121b288e9
5 files changed
+262

No files matched your search

@@ -0,0 +1,24 @@
package openonyx.features.render;
public enum PresetMode {
PULSAR,
CLOUDS,
THUNDER;
public int L() {
return this.ordinal();
}
private static PresetMode[] L() {
PresetMode[] presetModes = new PresetMode[3];
boolean bl = true;
presetModes[0] = CLOUDS;
presetModes[1] = THUNDER;
presetModes[2] = PULSAR;
return presetModes;
}
public boolean L() {
return this == THUNDER || this == PULSAR;
}
}
@@ -0,0 +1,35 @@
package openonyx.features.render;
import openonyx.history.DisplayNamed;
public enum QualityMode implements DisplayNamed {
FAST("Fast", 3),
BALANCED("Balanced", 4),
DETAILED("Detailed", 6);
private final int H;
private final String e;
QualityMode(String string1, int j) {
this.e = string1;
this.H = j;
}
@Override
public String getDisplayName() {
return this.e;
}
public int L() {
return this.H;
}
private static QualityMode[] L() {
QualityMode[] qualityModes = new QualityMode[3];
boolean bl = true;
qualityModes[0] = FAST;
qualityModes[1] = BALANCED;
qualityModes[2] = DETAILED;
return qualityModes;
}
}
@@ -0,0 +1,40 @@
package openonyx.features.render;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.history.internal.BooleanSetting;
import openonyx.history.internal.NumberSetting;
public final class SeeInvisibles extends Module {
public final BooleanSetting mobs;
public final NumberSetting opacity;
public final BooleanSetting players = new BooleanSetting("Players", true).describe("Show invisible players");
public final BooleanSetting animals;
public float L() {
return this.opacity.getFloat() / 100.0F;
}
public boolean L(EntityLivingBase entityLivingBase) {
if (!this.isEnabled() || entityLivingBase == null || !entityLivingBase.isInvisible()) {
return false;
} else if (entityLivingBase instanceof EntityPlayer) {
return this.players.isEnabled();
} else if (entityLivingBase instanceof IMob) {
return this.mobs.isEnabled();
} else {
return entityLivingBase instanceof EntityAnimal ? this.animals.isEnabled() : this.animals.isEnabled();
}
}
public SeeInvisibles() {
super("SeeInvisibles", "Renders invisible entities", ModuleCategory.RENDER);
this.mobs = new BooleanSetting("Mobs", true).describe("Show invisible hostile mobs");
this.animals = new BooleanSetting("Animals", false).describe("Show invisible passive mobs");
this.opacity = new NumberSetting("Opacity", 60.0, 10.0, 100.0, 5.0).withSuffix("%").describe("How solid an invisible entity is drawn");
}
}
+27
View File
@@ -0,0 +1,27 @@
package openonyx.features.render;
import openonyx.history.DisplayNamed;
public enum Shape implements DisplayNamed {
TWO_D("2D"),
THREE_D("3D");
private final String f;
Shape(String string1) {
this.f = string1;
}
private static Shape[] L() {
Shape[] shapes = new Shape[2];
boolean bl = true;
shapes[0] = TWO_D;
shapes[1] = THREE_D;
return shapes;
}
@Override
public String getDisplayName() {
return this.f;
}
}
@@ -0,0 +1,136 @@
package openonyx.features.render;
import java.util.Iterator;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import openonyx.core.OnyxClient;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.features.combat.AntiBot;
import openonyx.history.internal.BooleanSetting;
import openonyx.history.internal.ColorSetting;
import openonyx.history.internal.NumberSetting;
import openonyx.render.LineRenderer3D;
import openonyx.render.group_r.SkeletonModel;
import openonyx.render.group_r.SkeletonModelData;
import openonyx.theme.internal.ColorUtils;
public final class SkeletonESP extends Module {
public final NumberSetting jointSize;
public final BooleanSetting mobs;
public final NumberSetting range;
public final BooleanSetting throughWalls;
public final NumberSetting lineWidth;
public final ColorSetting color = new ColorSetting("Color", -8857601).D().describe("Colour of the bones");
public final BooleanSetting healthColor = new BooleanSetting("Health color", false).describe("Fade the bones from green to red as the target loses health");
public final BooleanSetting joints;
public SkeletonESP() {
super("SkeletonESP", "Draws the bones of nearby players", ModuleCategory.RENDER);
this.lineWidth = new NumberSetting("Line width", 1.5, 0.5, 5.0, 0.5).withSuffix(" px");
this.joints = new BooleanSetting("Joints", true).describe("Draw a dot at every joint");
this.jointSize = new NumberSetting("Joint size", 3.0, 1.0, 8.0, 0.5).withSuffix(" px").visibleWhen(this.joints);
this.throughWalls = new BooleanSetting("Through walls", true);
this.range = new NumberSetting("Range", 128.0, 8.0, 256.0, 8.0).withSuffix(" m");
this.mobs = new BooleanSetting("Mobs", false).describe("Also draw bones for non-player mobs");
}
private void L(Vec3 vec3, Vec3 vec31, int i) {
LineRenderer3D.d(vec3, vec31, i, i);
}
private void L(SkeletonModelData skeletonModelData, int i) {
LineRenderer3D.L();
this.L(skeletonModelData.head(), skeletonModelData.neck(), i);
this.L(skeletonModelData.neck(), skeletonModelData.hip(), i);
this.L(skeletonModelData.neck(), skeletonModelData.rightShoulder(), i);
this.L(skeletonModelData.neck(), skeletonModelData.leftShoulder(), i);
this.L(skeletonModelData.rightShoulder(), skeletonModelData.rightHand(), i);
this.L(skeletonModelData.leftShoulder(), skeletonModelData.leftHand(), i);
this.L(skeletonModelData.hip(), skeletonModelData.rightHipJoint(), i);
this.L(skeletonModelData.hip(), skeletonModelData.leftHipJoint(), i);
this.L(skeletonModelData.rightHipJoint(), skeletonModelData.rightFoot(), i);
this.L(skeletonModelData.leftHipJoint(), skeletonModelData.leftFoot(), i);
LineRenderer3D.D();
if (this.joints.isEnabled()) {
float f = this.jointSize.getFloat();
LineRenderer3D.L(skeletonModelData.head(), f, i);
LineRenderer3D.L(skeletonModelData.neck(), f, i);
LineRenderer3D.L(skeletonModelData.hip(), f, i);
LineRenderer3D.L(skeletonModelData.rightShoulder(), f, i);
LineRenderer3D.L(skeletonModelData.leftShoulder(), f, i);
LineRenderer3D.L(skeletonModelData.rightHand(), f, i);
LineRenderer3D.L(skeletonModelData.leftHand(), f, i);
LineRenderer3D.L(skeletonModelData.rightFoot(), f, i);
LineRenderer3D.L(skeletonModelData.leftFoot(), f, i);
}
}
public void L(float f) {
SkeletonESP skeletonESP1 = this;
if (skeletonESP1.isEnabled() && mc.theWorld != null && mc.thePlayer != null) {
double d = skeletonESP1.range.getValue();
boolean bl = false;
Iterator iterator = mc.theWorld.loadedEntityList.iterator();
label60:
while (true) {
Iterator iterator1 = iterator;
while (iterator1.hasNext()) {
Object object;
if (!((object = (EntityLivingBase)iterator.next()) instanceof EntityLivingBase) || (object = object) == mc.thePlayer) {
continue label60;
}
if (!object.isEntityAlive()) {
iterator1 = iterator;
} else if (AntiBot.L(object)) {
iterator1 = iterator;
} else if (!(object instanceof EntityPlayer) && !skeletonESP1.mobs.isEnabled()) {
iterator1 = iterator;
} else if (object.isInvisible() && !skeletonESP1.L(object)) {
iterator1 = iterator;
} else if (mc.thePlayer.getDistanceToEntity(object) > d) {
iterator1 = iterator;
} else {
if (!bl) {
if (!LineRenderer3D.L(f, skeletonESP1.throughWalls.isEnabled(), skeletonESP1.lineWidth.getFloat())) {
return;
}
bl = true;
}
skeletonESP1.L(SkeletonModel.L(object, f), skeletonESP1.L(object));
iterator1 = iterator;
}
}
if (bl) {
LineRenderer3D.d();
}
return;
}
}
}
private boolean L(EntityLivingBase entityLivingBase) {
return OnyxClient.moduleManager != null && OnyxClient.moduleManager.seeInvisibles.L(entityLivingBase);
}
private int L(EntityLivingBase entityLivingBase) {
SkeletonESP skeletonESP1 = this;
int i = skeletonESP1.color.getValue();
if (!skeletonESP1.healthColor.isEnabled()) {
return i;
}
float f = entityLivingBase.getMaxHealth() <= 0.0F ? 1.0F : Math.clamp(entityLivingBase.getHealth() / entityLivingBase.getMaxHealth(), 0.0F, 1.0F);
int k = Math.round(255.0F - 100.0F * f);
int j = Math.round(90.0F + 137.0F * f);
return ColorUtils.argb(ColorUtils.alpha(i), k, j, 98);
}
}