aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-09-11 10:33:47 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-09-11 10:33:47 +0300
commit7da68bd04c77ada6db04a5a7d20b56d08bfb8862 (patch)
tree5047b683069a8c3ea5b22eae8a8e783a4c0e2395 /src/main/java
parentb111faed7feca0e2384fcafb095a70e35434241d (diff)
downloadCITResewn-7da68bd04c77ada6db04a5a7d20b56d08bfb8862.tar.gz
CITResewn-7da68bd04c77ada6db04a5a7d20b56d08bfb8862.tar.bz2
CITResewn-7da68bd04c77ada6db04a5a7d20b56d08bfb8862.zip
Fixed cit.properties reading issue
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITPack.java5
1 files changed, 3 insertions, 2 deletions
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());