diff --git a/api/src/main/java/dev/the_fireplace/lib/api/client/interfaces/DecimalSliderOptionBuilder.java b/api/src/main/java/dev/the_fireplace/lib/api/client/interfaces/DecimalSliderOptionBuilder.java index 07c3f873..c517b049 100644 --- a/api/src/main/java/dev/the_fireplace/lib/api/client/interfaces/DecimalSliderOptionBuilder.java +++ b/api/src/main/java/dev/the_fireplace/lib/api/client/interfaces/DecimalSliderOptionBuilder.java @@ -7,5 +7,5 @@ public interface DecimalSliderOptionBuilder extends NumericOptionBuilder { DecimalSliderOptionBuilder setPrecision(byte precision); - void enablePercentMode(); + DecimalSliderOptionBuilder enablePercentMode(); } diff --git a/changelog.txt b/changelog.txt index 2e5cb2bd..c0516f68 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ Restructured in a way that also supports Forge Redesigned networking API -Adjusted config screen registry to take a modid parameter \ No newline at end of file +Adjusted config screen registry to take a modid parameter +Update DecimalSliderOptionBuilder's enablePercentMode to return self for easy method chaining \ No newline at end of file diff --git a/fabric/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java b/fabric/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java index 3b75f049..4b2dff86 100644 --- a/fabric/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java +++ b/fabric/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java @@ -55,8 +55,9 @@ public DecimalSliderOptionBuilder setPrecision(byte precision) { } @Override - public void enablePercentMode() { + public DecimalSliderOptionBuilder enablePercentMode() { isPercent = true; + return this; } private void resetSliderToPrecision(byte precision) { diff --git a/forge/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java b/forge/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java index 7e2a97df..d2cf85e7 100644 --- a/forge/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java +++ b/forge/src/main/java/dev/the_fireplace/lib/config/cloth/optionbuilder/ClothDecimalSliderOption.java @@ -52,8 +52,9 @@ public DecimalSliderOptionBuilder setPrecision(byte precision) { } @Override - public void enablePercentMode() { + public DecimalSliderOptionBuilder enablePercentMode() { isPercent = true; + return this; } private void resetSliderToPrecision(byte precision) {