fzzyhmstrs / fconfig

Other
7 stars 3 forks source link

Float slider freeze #16

Closed MincraftEinstein closed 3 weeks ago

MincraftEinstein commented 3 weeks ago

Float configs or double configs defined with a float, with a minimum value lower than 0.5 that use a slider cause the game to freeze when opening the containing screen.

Language: Java Mod version: 5.0.1 Game version: 1.21.1 Mod Loader: Fabric and Forge

fzzyhmstrs commented 3 weeks ago

I'll look into it, thanks

fzzyhmstrs commented 3 weeks ago

can you send me the exact validation snippet that was causing the problem so I can try to replicate it on my end with the same input? thanks.

fzzyhmstrs commented 3 weeks ago

I believe I have a fix inDev, but it would still be nice to get the validation that caused the problem so I can directly check

MincraftEinstein commented 3 weeks ago

Sure, here you go

public ValidatedFloat aFloat = new ValidatedFloat(1, 1, 0.3F);

@ValidatedFloat.Restrict(min = 0.3F, max = 1)
public float aFloat2 = 1;

public ValidatedFloat aFloat3 = new ValidatedFloat(1, 1, 0.3F);

public ValidatedDouble aDouble = new ValidatedDouble(1, 1, 0.3F);

Any of these will cause the issue

fzzyhmstrs commented 3 weeks ago

thank you. Confirmed fixed in dev. patch will be out soon image