From 30e37a5641536c822a8a229e9418934013c584c9 Mon Sep 17 00:00:00 2001 From: winterflyt <36+winterflyt@noreply.skidsolutions.xyz> Date: Mon, 30 Nov 2026 05:58:11 +0200 Subject: [PATCH] Upload files to "src/openonyx/features/render" --- src/openonyx/features/render/FillMode.java | 14 ++++ src/openonyx/features/render/FogBlur.java | 21 +++++ src/openonyx/features/render/FogRemove.java | 23 ++++++ src/openonyx/features/render/Freelook.java | 86 ++++++++++++++++++++ src/openonyx/features/render/Fullbright.java | 36 ++++++++ 5 files changed, 180 insertions(+) create mode 100644 src/openonyx/features/render/FillMode.java create mode 100644 src/openonyx/features/render/FogBlur.java create mode 100644 src/openonyx/features/render/FogRemove.java create mode 100644 src/openonyx/features/render/Freelook.java create mode 100644 src/openonyx/features/render/Fullbright.java diff --git a/src/openonyx/features/render/FillMode.java b/src/openonyx/features/render/FillMode.java new file mode 100644 index 0000000..c357252 --- /dev/null +++ b/src/openonyx/features/render/FillMode.java @@ -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; + } +} diff --git a/src/openonyx/features/render/FogBlur.java b/src/openonyx/features/render/FogBlur.java new file mode 100644 index 0000000..4ea61c2 --- /dev/null +++ b/src/openonyx/features/render/FogBlur.java @@ -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); + } +} diff --git a/src/openonyx/features/render/FogRemove.java b/src/openonyx/features/render/FogRemove.java new file mode 100644 index 0000000..0b4b7d9 --- /dev/null +++ b/src/openonyx/features/render/FogRemove.java @@ -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); + } +} diff --git a/src/openonyx/features/render/Freelook.java b/src/openonyx/features/render/Freelook.java new file mode 100644 index 0000000..a0f99e6 --- /dev/null +++ b/src/openonyx/features/render/Freelook.java @@ -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 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; + } + } +} diff --git a/src/openonyx/features/render/Fullbright.java b/src/openonyx/features/render/Fullbright.java new file mode 100644 index 0000000..6b4c63b --- /dev/null +++ b/src/openonyx/features/render/Fullbright.java @@ -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); + } +}