Ensure changes from keyboard in ForgeSlider behave as changes from mouse (#10554)

This commit is contained in:
Olivier Sechet authored and GitHub committed 2025-05-09 15:14:16 -07:00
1 parent 77af36b807
commit 5d2186df63
1 file changed
+3
@@ -109,7 +109,10 @@ public class ForgeSlider extends AbstractSliderButton {
* @param value The new slider value
*/
public void setValue(double value) {
double oldValue = this.value;
this.value = this.snapToNearest((value - this.minValue) / (this.maxValue - this.minValue));
if (!Mth.equal(oldValue, this.value))
this.applyValue();
this.updateMessage();
}