We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 615527f commit bd17428Copy full SHA for bd17428
common/src/main/java/fr/tathan/sky_aesthetics/client/screens/SkyModificationScreen.java
@@ -360,12 +360,13 @@ public static Optional<Vector4f> getVec4fFromComponent(FlowLayout component) {
360
}
361
362
public static Object convertValue(String str, Class<?> type) {
363
+ str = str.isEmpty() ? "-1" : str;
364
try {
365
return switch (type.getSimpleName()) {
366
case "int", "Integer" -> Integer.parseInt(str);
367
case "long", "Long" -> Long.parseLong(str);
368
case "double", "Double" -> Double.parseDouble(str);
- case "float", "Float" -> Float.parseFloat(str);
369
+ case "float", "Float" -> (float) Float.parseFloat(str);
370
default -> str;
371
};
372
} catch (Exception e) {
0 commit comments