From fc734c2334701466a10642542835672ef87dbdc1 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 1 Aug 2019 22:32:41 +0200 Subject: [PATCH] Clamp to the ends so it's easier to reach the max/min on the slider. --- src/main/java/com/minelittlepony/settings/PonyConfig.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/minelittlepony/settings/PonyConfig.java b/src/main/java/com/minelittlepony/settings/PonyConfig.java index f1ba0eda..b48a314f 100644 --- a/src/main/java/com/minelittlepony/settings/PonyConfig.java +++ b/src/main/java/com/minelittlepony/settings/PonyConfig.java @@ -40,6 +40,14 @@ public class PonyConfig extends JsonConfig { } public float setGlobalScaleFactor(float f) { + + if (f < 0.15F) { + f = 0.1F; + } + if (f > 2.95) { + f = 3; + } + f = Math.round(MathHelper.clamp(f, 0.1F, 3) * 100) / 100F; scaleFactor.set(f);