From 5532a7cb4fb4ed00d92b6117b6af66386be72fed Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Fri, 20 Mar 2026 21:03:53 +0100 Subject: [PATCH] Fixed features --- .../feature/features/ArmorDisplayFeature.java | 5 ++-- .../feature/features/AutoSprintFeature.java | 3 ++- .../feature/features/ClockFeature.java | 8 ++++--- .../feature/features/CoordinatesFeature.java | 6 +++-- .../feature/features/CrosshairFeature.java | 3 ++- .../feature/features/DayCounterFeature.java | 4 +++- .../feature/features/FpsFeature.java | 4 +++- .../feature/features/FreelookFeature.java | 8 ++++--- .../feature/features/FullbrightFeature.java | 6 +++-- .../features/HealthDisplayFeature.java | 8 ++++--- .../feature/features/KeystrokesFeature.java | 12 ++++++---- .../feature/features/NametagsFeature.java | 24 ++++++++++--------- .../feature/features/NoFogFeature.java | 5 ++-- .../feature/features/PingFeature.java | 3 ++- .../feature/features/SpeedometerFeature.java | 10 ++++---- .../features/StatusEffectsFeature.java | 4 +++- .../feature/features/TpsFeature.java | 3 ++- .../feature/features/ZoomFeature.java | 11 +++++---- 18 files changed, 79 insertions(+), 48 deletions(-) diff --git a/src/main/java/org/saturnclient/feature/features/ArmorDisplayFeature.java b/src/main/java/org/saturnclient/feature/features/ArmorDisplayFeature.java index d5da3bf..3430a0d 100644 --- a/src/main/java/org/saturnclient/feature/features/ArmorDisplayFeature.java +++ b/src/main/java/org/saturnclient/feature/features/ArmorDisplayFeature.java @@ -3,6 +3,7 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; import org.saturnclient.common.module.PlayerModule; import org.saturnclient.common.ref.game.ItemStackRef; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -18,8 +19,8 @@ import org.saturnclient.ui.RenderScope; */ public class ArmorDisplayFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); - private static final Property useMainHand = Property.bool(true); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty useMainHand = Property.bool(true); private static final FeatureLayout layout = new FeatureLayout(40, 75); public ArmorDisplayFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/AutoSprintFeature.java b/src/main/java/org/saturnclient/feature/features/AutoSprintFeature.java index ed89c6a..6b0df81 100644 --- a/src/main/java/org/saturnclient/feature/features/AutoSprintFeature.java +++ b/src/main/java/org/saturnclient/feature/features/AutoSprintFeature.java @@ -1,6 +1,7 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.common.module.NetworkModule; import org.saturnclient.common.module.PlayerModule; @@ -13,7 +14,7 @@ import org.saturnclient.feature.FeatureDetails; */ public class AutoSprintFeature extends Feature { - private static final Property enabled = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); public AutoSprintFeature() { super( diff --git a/src/main/java/org/saturnclient/feature/features/ClockFeature.java b/src/main/java/org/saturnclient/feature/features/ClockFeature.java index 9cc42b7..eec91ed 100644 --- a/src/main/java/org/saturnclient/feature/features/ClockFeature.java +++ b/src/main/java/org/saturnclient/feature/features/ClockFeature.java @@ -5,7 +5,9 @@ import java.time.format.DateTimeFormatter; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; +import org.saturnclient.config.property.SelectProperty; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; import org.saturnclient.feature.FeatureLayout; @@ -17,9 +19,9 @@ import org.saturnclient.feature.HudFeature; */ public class ClockFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); - private static final Property format = Property.select(0, "24 hour", "12 hour"); - private static final Property showSeconds = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); + private static final SelectProperty format = Property.select(0, "24 hour", "12 hour"); + private static final BoolProperty showSeconds = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(60, Fonts.getHeight()); public ClockFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/CoordinatesFeature.java b/src/main/java/org/saturnclient/feature/features/CoordinatesFeature.java index 7715173..f18d483 100644 --- a/src/main/java/org/saturnclient/feature/features/CoordinatesFeature.java +++ b/src/main/java/org/saturnclient/feature/features/CoordinatesFeature.java @@ -1,7 +1,9 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; +import org.saturnclient.config.property.SelectProperty; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; import org.saturnclient.feature.Feature; @@ -15,8 +17,8 @@ import org.saturnclient.feature.HudFeature; */ public class CoordinatesFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); - private static final Property displayMethod = Property.select(0, + private static final BoolProperty enabled = Property.bool(false); + private static final SelectProperty displayMethod = Property.select(0, "Flat", "Flat annotated", "Newline", diff --git a/src/main/java/org/saturnclient/feature/features/CrosshairFeature.java b/src/main/java/org/saturnclient/feature/features/CrosshairFeature.java index dce022b..ac256ac 100644 --- a/src/main/java/org/saturnclient/feature/features/CrosshairFeature.java +++ b/src/main/java/org/saturnclient/feature/features/CrosshairFeature.java @@ -1,6 +1,7 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.common.module.RenderModule; import org.saturnclient.ui.RenderScope; @@ -14,7 +15,7 @@ import org.saturnclient.feature.FeatureDetails; */ public class CrosshairFeature extends Feature { - public static final Property enabled = Property.bool(false); + public static final BoolProperty enabled = Property.bool(false); private static final int CROSSHAIR_SIZE = 15; diff --git a/src/main/java/org/saturnclient/feature/features/DayCounterFeature.java b/src/main/java/org/saturnclient/feature/features/DayCounterFeature.java index fdf4540..38a58f7 100644 --- a/src/main/java/org/saturnclient/feature/features/DayCounterFeature.java +++ b/src/main/java/org/saturnclient/feature/features/DayCounterFeature.java @@ -1,6 +1,8 @@ package org.saturnclient.feature.features; +import org.saturnclient.common.module.WorldModule; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; @@ -15,7 +17,7 @@ import org.saturnclient.feature.HudFeature; */ public class DayCounterFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(40, 18); public DayCounterFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/FpsFeature.java b/src/main/java/org/saturnclient/feature/features/FpsFeature.java index d4ccb50..0cb85dd 100644 --- a/src/main/java/org/saturnclient/feature/features/FpsFeature.java +++ b/src/main/java/org/saturnclient/feature/features/FpsFeature.java @@ -1,6 +1,8 @@ package org.saturnclient.feature.features; +import org.saturnclient.common.module.RenderModule; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; @@ -15,7 +17,7 @@ import org.saturnclient.feature.HudFeature; */ public class FpsFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(60, Fonts.getHeight()); public FpsFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/FreelookFeature.java b/src/main/java/org/saturnclient/feature/features/FreelookFeature.java index bb9d857..7040473 100644 --- a/src/main/java/org/saturnclient/feature/features/FreelookFeature.java +++ b/src/main/java/org/saturnclient/feature/features/FreelookFeature.java @@ -1,6 +1,8 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; +import org.saturnclient.config.property.KeybindingProperty; import org.saturnclient.config.property.Property; import org.saturnclient.common.module.RenderModule; import org.saturnclient.common.provider.GLFWProvider; @@ -16,9 +18,9 @@ import org.saturnclient.feature.FeatureDetails; */ public class FreelookFeature extends Feature { - private static final Property enabled = Property.bool(false); - private static final Property toggle = Property.bool(true); - public static final Property freelookKey = Property.keybinding(GLFWProvider.GLFW_KEY_H); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty toggle = Property.bool(true); + public static final KeybindingProperty freelookKey = Property.keybinding(GLFWProvider.GLFW_KEY_H); /** Whether freelook is currently active (read by the camera mixin). */ public static boolean isFreeLooking = false; diff --git a/src/main/java/org/saturnclient/feature/features/FullbrightFeature.java b/src/main/java/org/saturnclient/feature/features/FullbrightFeature.java index ca35852..9150004 100644 --- a/src/main/java/org/saturnclient/feature/features/FullbrightFeature.java +++ b/src/main/java/org/saturnclient/feature/features/FullbrightFeature.java @@ -1,5 +1,7 @@ package org.saturnclient.feature.features; +import org.saturnclient.config.property.BoolProperty; +import org.saturnclient.config.property.IntProperty; import org.saturnclient.config.property.Property; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -16,8 +18,8 @@ import org.saturnclient.feature.FeatureDetails; */ public class FullbrightFeature extends Feature { - private static final Property enabled = Property.bool(false); - private static final Property brightness = Property.integer(100); + private static final BoolProperty enabled = Property.bool(false); + private static final IntProperty brightness = Property.integer(100); public FullbrightFeature() { super( diff --git a/src/main/java/org/saturnclient/feature/features/HealthDisplayFeature.java b/src/main/java/org/saturnclient/feature/features/HealthDisplayFeature.java index e797306..b9807ca 100644 --- a/src/main/java/org/saturnclient/feature/features/HealthDisplayFeature.java +++ b/src/main/java/org/saturnclient/feature/features/HealthDisplayFeature.java @@ -1,7 +1,9 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; +import org.saturnclient.config.property.SelectProperty; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; import org.saturnclient.feature.Feature; @@ -16,9 +18,9 @@ import org.saturnclient.feature.HudFeature; */ public class HealthDisplayFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); - private static final Property displayMode = Property.select(0, "Health", "Hearts"); - private static final Property decimals = Property.select(0, "0", "1", "2"); + private static final BoolProperty enabled = Property.bool(false); + private static final SelectProperty displayMode = Property.select(0, "Health", "Hearts"); + private static final SelectProperty decimals = Property.select(0, "0", "1", "2"); private static final FeatureLayout layout = new FeatureLayout(40, 18); public HealthDisplayFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/KeystrokesFeature.java b/src/main/java/org/saturnclient/feature/features/KeystrokesFeature.java index af19597..f4fcaa1 100644 --- a/src/main/java/org/saturnclient/feature/features/KeystrokesFeature.java +++ b/src/main/java/org/saturnclient/feature/features/KeystrokesFeature.java @@ -1,6 +1,8 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; +import org.saturnclient.config.property.ColorProperty; import org.saturnclient.config.property.Property; import org.saturnclient.common.module.PlayerModule; import org.saturnclient.ui.RenderScope; @@ -19,12 +21,12 @@ public class KeystrokesFeature extends Feature implements HudFeature { // Configuration // --------------------------------------------------------------- - private static final Property enabled = Property.bool(false); - private static final Property showMouse = Property.bool(true); - private static final Property showSpace = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty showMouse = Property.bool(true); + private static final BoolProperty showSpace = Property.bool(false); - private static final Property clickBg = Property.color(0xFFCCCCCC); - private static final Property clickFg = Property.color(0xFFFFFFFF); + private static final ColorProperty clickBg = Property.color(0xFFCCCCCC); + private static final ColorProperty clickFg = Property.color(0xFFFFFFFF); private static final FeatureLayout layout = new FeatureLayout(78, 54); diff --git a/src/main/java/org/saturnclient/feature/features/NametagsFeature.java b/src/main/java/org/saturnclient/feature/features/NametagsFeature.java index 27c782d..b10fe1b 100644 --- a/src/main/java/org/saturnclient/feature/features/NametagsFeature.java +++ b/src/main/java/org/saturnclient/feature/features/NametagsFeature.java @@ -1,7 +1,9 @@ package org.saturnclient.feature.features; import org.saturnclient.common.module.EntityModule; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; +import org.saturnclient.config.property.SelectProperty; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -22,21 +24,21 @@ public class NametagsFeature extends Feature { // Configuration // --------------------------------------------------------------- - private static final Property enabled = Property.bool(false); - private static final Property healthDisplay = Property.bool(false); - private static final Property players = Property.bool(true); - private static final Property hostile = Property.bool(false); - private static final Property passive = Property.bool(false); - private static final Property heartEmoji = Property.bool(true); - private static final Property obfuscate = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty healthDisplay = Property.bool(false); + private static final BoolProperty players = Property.bool(true); + private static final BoolProperty hostile = Property.bool(false); + private static final BoolProperty passive = Property.bool(false); + private static final BoolProperty heartEmoji = Property.bool(true); + private static final BoolProperty obfuscate = Property.bool(false); - private static final Property unit = Property.select(0, "Health", "Hearts"); - private static final Property format = Property.select(0, "Value", "Value / Total", "%"); + private static final SelectProperty unit = Property.select(0, "Health", "Hearts"); + private static final SelectProperty format = Property.select(0, "Value", "Value / Total", "%"); - private static final Property nameColor = Property.select(15, + private static final SelectProperty nameColor = Property.select(15, "Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"); - private static final Property healthColor = Property.select(12, + private static final SelectProperty healthColor = Property.select(12, "Black", "Dark Blue", "Dark Green", "Dark Aqua", "Dark Red", "Dark Purple", "Gold", "Gray", "Dark Gray", "Blue", "Green", "Aqua", "Red", "Light Purple", "Yellow", "White"); diff --git a/src/main/java/org/saturnclient/feature/features/NoFogFeature.java b/src/main/java/org/saturnclient/feature/features/NoFogFeature.java index b20f605..5532c70 100644 --- a/src/main/java/org/saturnclient/feature/features/NoFogFeature.java +++ b/src/main/java/org/saturnclient/feature/features/NoFogFeature.java @@ -1,5 +1,6 @@ package org.saturnclient.feature.features; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -13,8 +14,8 @@ import org.saturnclient.feature.FeatureDetails; */ public class NoFogFeature extends Feature { - private static final Property enabled = Property.bool(false); - private static final Property liquids = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty liquids = Property.bool(false); public NoFogFeature() { super( diff --git a/src/main/java/org/saturnclient/feature/features/PingFeature.java b/src/main/java/org/saturnclient/feature/features/PingFeature.java index ef68b8a..54df1cf 100644 --- a/src/main/java/org/saturnclient/feature/features/PingFeature.java +++ b/src/main/java/org/saturnclient/feature/features/PingFeature.java @@ -1,6 +1,7 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; @@ -15,7 +16,7 @@ import org.saturnclient.feature.HudFeature; */ public class PingFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(60, Fonts.getHeight()); public PingFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/SpeedometerFeature.java b/src/main/java/org/saturnclient/feature/features/SpeedometerFeature.java index 6f3c4dd..cec2f65 100644 --- a/src/main/java/org/saturnclient/feature/features/SpeedometerFeature.java +++ b/src/main/java/org/saturnclient/feature/features/SpeedometerFeature.java @@ -1,7 +1,9 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.Providers; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; +import org.saturnclient.config.property.SelectProperty; import org.saturnclient.common.module.PlayerModule; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; @@ -16,10 +18,10 @@ import org.saturnclient.feature.HudFeature; */ public class SpeedometerFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); - private static final Property axis = Property.select(1, "Absolute", "Horizontal", "Vertical"); - private static final Property unitText = Property.select(0, "None", "Blocks/s", "blocks/s", "b/s"); - private static final Property showLabel = Property.bool(true); + private static final BoolProperty enabled = Property.bool(false); + private static final SelectProperty axis = Property.select(1, "Absolute", "Horizontal", "Vertical"); + private static final SelectProperty unitText = Property.select(0, "None", "Blocks/s", "blocks/s", "b/s"); + private static final BoolProperty showLabel = Property.bool(true); private static final FeatureLayout layout = new FeatureLayout(40, 18); private double cachedSpeed = 0.0; diff --git a/src/main/java/org/saturnclient/feature/features/StatusEffectsFeature.java b/src/main/java/org/saturnclient/feature/features/StatusEffectsFeature.java index 8ab5080..98d1286 100644 --- a/src/main/java/org/saturnclient/feature/features/StatusEffectsFeature.java +++ b/src/main/java/org/saturnclient/feature/features/StatusEffectsFeature.java @@ -2,8 +2,10 @@ package org.saturnclient.feature.features; import java.util.List; +import org.saturnclient.common.provider.ModuleProvider; import org.saturnclient.common.provider.Providers; import org.saturnclient.common.ref.asset.SpriteRef; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.ui.RenderScope; import org.saturnclient.feature.Feature; @@ -22,7 +24,7 @@ import org.saturnclient.feature.HudFeature; */ public class StatusEffectsFeature extends Feature implements HudFeature { - public static final Property enabled = Property.bool(false); + public static final BoolProperty enabled = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(60, 0); public StatusEffectsFeature() { diff --git a/src/main/java/org/saturnclient/feature/features/TpsFeature.java b/src/main/java/org/saturnclient/feature/features/TpsFeature.java index 69ba8d6..accf08c 100644 --- a/src/main/java/org/saturnclient/feature/features/TpsFeature.java +++ b/src/main/java/org/saturnclient/feature/features/TpsFeature.java @@ -2,6 +2,7 @@ package org.saturnclient.feature.features; import org.saturnclient.ui.RenderScope; import org.saturnclient.ui.resources.Fonts; +import org.saturnclient.config.property.BoolProperty; import org.saturnclient.config.property.Property; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -19,7 +20,7 @@ import org.saturnclient.feature.HudFeature; */ public class TpsFeature extends Feature implements HudFeature { - private static final Property enabled = Property.bool(false); + private static final BoolProperty enabled = Property.bool(false); private static final FeatureLayout layout = new FeatureLayout(60, Fonts.getHeight()); // --------------------------------------------------------------- diff --git a/src/main/java/org/saturnclient/feature/features/ZoomFeature.java b/src/main/java/org/saturnclient/feature/features/ZoomFeature.java index fec864b..fc45592 100644 --- a/src/main/java/org/saturnclient/feature/features/ZoomFeature.java +++ b/src/main/java/org/saturnclient/feature/features/ZoomFeature.java @@ -1,6 +1,9 @@ package org.saturnclient.feature.features; import org.saturnclient.common.provider.GLFWProvider; +import org.saturnclient.config.property.BoolProperty; +import org.saturnclient.config.property.FloatProperty; +import org.saturnclient.config.property.KeybindingProperty; import org.saturnclient.config.property.Property; import org.saturnclient.feature.Feature; import org.saturnclient.feature.FeatureDetails; @@ -15,10 +18,10 @@ import org.saturnclient.feature.FeatureDetails; */ public class ZoomFeature extends Feature { - private static final Property enabled = Property.bool(false); - private static final Property toggle = Property.bool(false); - public static final Property zoomKey = Property.keybinding(GLFWProvider.GLFW_KEY_C); - public static final Property zoomLevel = Property.floatProp(3.0f); + private static final BoolProperty enabled = Property.bool(false); + private static final BoolProperty toggle = Property.bool(false); + public static final KeybindingProperty zoomKey = Property.keybinding(GLFWProvider.GLFW_KEY_C); + public static final FloatProperty zoomLevel = Property.floatProp(3.0f); /** Whether zoom is currently active (read by the FOV mixin). */ public static boolean isZooming = false;