diff --git a/forge/src/main/java/net/blay09/mods/balm/forge/config/ForgeBalmConfig.java b/forge/src/main/java/net/blay09/mods/balm/forge/config/ForgeBalmConfig.java index bd853bec..b8cb0196 100644 --- a/forge/src/main/java/net/blay09/mods/balm/forge/config/ForgeBalmConfig.java +++ b/forge/src/main/java/net/blay09/mods/balm/forge/config/ForgeBalmConfig.java @@ -114,6 +114,8 @@ private void readConfigValues(String parentPath, T instance, ModConfig confi field.set(instance, doubleValue.floatValue()); } else if (value instanceof Float floatValue) { field.set(instance, floatValue); + } else if (value instanceof Integer integerValue) { + field.set(instance, integerValue.floatValue()); } else { logger.error("Invalid config value for " + path + ", expected " + type.getName() + " but got " + value.getClass()); } @@ -123,6 +125,8 @@ private void readConfigValues(String parentPath, T instance, ModConfig confi field.set(instance, doubleValue); } else if (value instanceof Float floatValue) { field.set(instance, floatValue.doubleValue()); + } else if (value instanceof Integer integerValue) { + field.set(instance, integerValue.doubleValue()); } else { logger.error("Invalid config value for " + path + ", expected " + type.getName() + " but got " + value.getClass()); }