From 7da68bd04c77ada6db04a5a7d20b56d08bfb8862 Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Sat, 11 Sep 2021 10:33:47 +0300 Subject: Fixed cit.properties reading issue --- src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/shcm') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java index 78dc0e3..ef4842e 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java @@ -8,6 +8,7 @@ import shcm.shsupercm.fabric.citresewn.pack.cits.CIT; import java.util.ArrayList; import java.util.Collection; +import java.util.Locale; import java.util.Properties; public class CITPack { @@ -24,7 +25,7 @@ public class CITPack { } public void loadProperties(Properties properties) { - method = CITPack.EnchantmentMergeMethod.valueOf(properties.getProperty("method", "average")); + method = CITPack.EnchantmentMergeMethod.valueOf(properties.getProperty("method", "average").toUpperCase(Locale.ENGLISH)); try { cap = Integer.parseInt(properties.getProperty("cap", "8")); } catch (NumberFormatException e) { @@ -35,7 +36,7 @@ public class CITPack { } catch (NumberFormatException e) { CITResewn.logErrorLoading(new CITParseException(resourcePack, new Identifier("cit.properties"), "fade is not a number").getMessage()); } - switch (properties.getProperty("useGlint", "true")) { + switch (properties.getProperty("useGlint", "true").toLowerCase(Locale.ENGLISH)) { case "true" -> useGlint = true; case "false" -> useGlint = false; default -> CITResewn.logErrorLoading(new CITParseException(resourcePack, new Identifier("cit.properties"), "useGlint is not a boolean").getMessage()); -- cgit