mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Clamp to the ends so it's easier to reach the max/min on the slider.
This commit is contained in:
parent
b45a2a9788
commit
fc734c2334
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue