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

This commit is contained in:
winterflyt committed 2026-11-30 05:58:11 +02:00
1 parent 009aefdc2c
commit 30e37a5641
5 files changed
+180

No files matched your search

@@ -0,0 +1,14 @@
package openonyx.features.render;
public enum FillMode {
SOLID,
SHADER;
private static FillMode[] L() {
FillMode[] fillModes = new FillMode[2];
boolean bl = true;
fillModes[0] = SOLID;
fillModes[1] = SHADER;
return fillModes;
}
}
+21
View File
@@ -0,0 +1,21 @@
package openonyx.features.render;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.history.internal.BooleanSetting;
import openonyx.history.internal.NumberSetting;
public final class FogBlur extends Module {
public final NumberSetting tint;
public final BooleanSetting disableOnZoom;
public final NumberSetting distance = new NumberSetting("Distance", 24.0, 4.0, 256.0, 1.0).withSuffix("m");
public final BooleanSetting clientColor;
public final NumberSetting fade = new NumberSetting("Fade", 48.0, 4.0, 256.0, 1.0).withSuffix("m");
public FogBlur() {
super("Fog Blur", "Blurs the world based on distance from the camera", ModuleCategory.RENDER);
this.clientColor = new BooleanSetting("Client Color", true);
this.tint = new NumberSetting("Tint", 0.5, 0.05, 0.95, 0.05).visibleWhen(this.clientColor);
this.disableOnZoom = new BooleanSetting("Disable on zoom", true);
}
}
@@ -0,0 +1,23 @@
package openonyx.features.render;
import net.minecraft.client.renderer.GlStateManager;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
public final class FogRemove extends Module {
private static final float H = 8.5070587E37F;
private static final float e = 1.7014117E38F;
public void L(int i) {
if (this.isEnabled()) {
GlStateManager.setFog(9729);
GlStateManager.setFogDensity(0.0F);
GlStateManager.setFogStart(8.5070587E37F);
GlStateManager.setFogEnd(1.7014117E38F);
}
}
public FogRemove() {
super("FogRemove", "Removes first-person environmental and distance fog", ModuleCategory.RENDER);
}
}
@@ -0,0 +1,86 @@
package openonyx.features.render;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.util.MathHelper;
import openonyx.configuration.internal.RunTickEvent;
import openonyx.configuration.internal.WorldChangeEvent;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.history.internal.EnumSetting;
import openonyx.history.internal.NumberSetting;
import openonyx.render.CameraState;
public final class Freelook extends Module {
private float m;
private float h;
private boolean l;
private float I;
public final NumberSetting sensitivity;
private int i;
private static final double f = 0.15;
public final EnumSetting<PerspectiveMode> perspective = new EnumSetting<>("Perspective", PerspectiveMode.BACK)
.describe("Which way the detached camera faces");
private float e;
@EventHandler
private void onWorldChange(WorldChangeEvent worldChangeEvent) {
this.F();
}
@Override
protected void onDisable() {
this.F();
}
private void F() {
if (this.l) {
this.l = false;
mc.gameSettings.thirdPersonView = this.i;
}
}
@EventHandler
private void onRunTick(RunTickEvent runTickEvent) {
this.I = this.e;
this.m = this.h;
}
public boolean L(float f, float g) {
if (this.isEnabled() && mc.thePlayer != null) {
this.h();
double d = 0.15 * (this.sensitivity.getFloat() / 100.0);
this.e += (float)(fx * d);
this.h = MathHelper.clamp_float((float)(this.h - g * d), -90.0F, 90.0F);
return true;
} else {
return false;
}
}
public Freelook() {
super("Freelook", "Look around without turning your player", ModuleCategory.RENDER);
this.sensitivity = new NumberSetting("Sensitivity", 100.0, 25.0, 200.0, 5.0).withSuffix("%").describe("Mouse speed while looking around");
}
@Override
protected void onEnable() {
this.l = false;
}
public void l() {
if (this.isEnabled() && mc.thePlayer != null) {
this.h();
CameraState.L(this.e, this.h, this.I, this.m);
}
}
private void h() {
if (!this.l && mc.thePlayer != null) {
this.e = this.I = mc.thePlayer.rotationYaw;
this.h = this.m = mc.thePlayer.rotationPitch;
this.i = mc.gameSettings.thirdPersonView;
mc.gameSettings.thirdPersonView = this.perspective.getValue().L();
this.l = true;
}
}
}
@@ -0,0 +1,36 @@
package openonyx.features.render;
import meteordevelopment.orbit.EventHandler;
import openonyx.configuration.internal.RunTickEvent;
import openonyx.features.Module;
import openonyx.features.ModuleCategory;
import openonyx.history.internal.NumberSetting;
public class Fullbright extends Module {
public NumberSetting gamma = new NumberSetting("Gamma", 100.0, 1.0, 100.0, 1.0).describe("Gamma to apply (vanilla max brightness is 1)");
private float e;
@Override
protected void onEnable() {
this.e = mc.gameSettings.gammaSetting;
this.h();
}
@Override
protected void onDisable() {
mc.gameSettings.gammaSetting = this.e;
}
@EventHandler
private void onRunTick(RunTickEvent runTickEvent) {
this.h();
}
private void h() {
mc.gameSettings.gammaSetting = this.gamma.getFloat();
}
public Fullbright() {
super("Fullbright", "Makes the world brighter", ModuleCategory.RENDER);
}
}