aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsenseiwells <66843746+senseiwells@users.noreply.github.com>2024-10-20 22:37:36 +0100
committerGitHub <noreply@github.com>2024-10-20 22:37:36 +0100
commit9038c84f2ab5edf575e3968bc5b6e502a9ced3ba (patch)
tree9adb42bf002e66911fc792d985530db381f592d3 /src
parent52eaf8b98d8e74a92b7769892fc9f26a74354706 (diff)
downloadYetAnotherConfigLib-9038c84f2ab5edf575e3968bc5b6e502a9ced3ba.tar.gz
YetAnotherConfigLib-9038c84f2ab5edf575e3968bc5b6e502a9ced3ba.tar.bz2
YetAnotherConfigLib-9038c84f2ab5edf575e3968bc5b6e502a9ced3ba.zip
Fix default min values for floating point field controllers (#213)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/dev/isxander/yacl3/impl/controller/DoubleFieldControllerBuilderImpl.java2
-rw-r--r--src/main/java/dev/isxander/yacl3/impl/controller/FloatFieldControllerBuilderImpl.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/dev/isxander/yacl3/impl/controller/DoubleFieldControllerBuilderImpl.java b/src/main/java/dev/isxander/yacl3/impl/controller/DoubleFieldControllerBuilderImpl.java
index 8d84e7d..51369cc 100644
--- a/src/main/java/dev/isxander/yacl3/impl/controller/DoubleFieldControllerBuilderImpl.java
+++ b/src/main/java/dev/isxander/yacl3/impl/controller/DoubleFieldControllerBuilderImpl.java
@@ -11,7 +11,7 @@ import net.minecraft.network.chat.Component;
import java.util.function.Function;
public class DoubleFieldControllerBuilderImpl extends AbstractControllerBuilderImpl<Double> implements DoubleFieldControllerBuilder {
- private double min = Double.MIN_VALUE;
+ private double min = -Double.MAX_VALUE;
private double max = Double.MAX_VALUE;
private ValueFormatter<Double> formatter = DoubleSliderController.DEFAULT_FORMATTER::apply;
diff --git a/src/main/java/dev/isxander/yacl3/impl/controller/FloatFieldControllerBuilderImpl.java b/src/main/java/dev/isxander/yacl3/impl/controller/FloatFieldControllerBuilderImpl.java
index 08fefd0..904b323 100644
--- a/src/main/java/dev/isxander/yacl3/impl/controller/FloatFieldControllerBuilderImpl.java
+++ b/src/main/java/dev/isxander/yacl3/impl/controller/FloatFieldControllerBuilderImpl.java
@@ -11,7 +11,7 @@ import net.minecraft.network.chat.Component;
import java.util.function.Function;
public class FloatFieldControllerBuilderImpl extends AbstractControllerBuilderImpl<Float> implements FloatFieldControllerBuilder {
- private float min = Float.MIN_VALUE;
+ private float min = -Float.MAX_VALUE;
private float max = Float.MAX_VALUE;
private ValueFormatter<Float> formatter = FloatSliderController.DEFAULT_FORMATTER::apply;