aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/config
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-09-07 12:18:42 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-09-07 12:18:42 +0300
commita69a294e7b0abaadb23989a3b24dd502e5cb6771 (patch)
treeda521b3c42d1d14e0d230d29788bc16ccb087ffc /src/main/java/shcm/shsupercm/fabric/citresewn/config
parente0c23cb732a8837871f4e7f6d4125d0fa92404f5 (diff)
downloadCITResewn-a69a294e7b0abaadb23989a3b24dd502e5cb6771.tar.gz
CITResewn-a69a294e7b0abaadb23989a3b24dd502e5cb6771.tar.bz2
CITResewn-a69a294e7b0abaadb23989a3b24dd502e5cb6771.zip
Added support for packs with broken paths(config)
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/config')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfig.java1
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfigScreenFactory.java11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfig.java b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfig.java
index d933e84..5bc059e 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfig.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfig.java
@@ -13,6 +13,7 @@ public class CITResewnConfig {
public boolean enabled = true;
public boolean mute_errors = false;
public boolean mute_warns = false;
+ public boolean broken_paths = false;
private static final File FILE = new File("config/citresewn.json");
public static CITResewnConfig INSTANCE() {
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfigScreenFactory.java b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfigScreenFactory.java
index a47e6d4..b85a55c 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfigScreenFactory.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnConfigScreenFactory.java
@@ -43,6 +43,17 @@ public class CITResewnConfigScreenFactory {
.setDefaultValue(defaultConfig.mute_warns)
.build());
+ category.addEntry(entryBuilder.startBooleanToggle(new TranslatableText("config.citresewn.broken_paths.title"), currentConfig.broken_paths)
+ .setTooltip(new TranslatableText("config.citresewn.broken_paths.tooltip"))
+ .setSaveConsumer(newConfig -> {
+ if (currentConfig.broken_paths != newConfig) {
+ currentConfig.broken_paths = newConfig;
+ MinecraftClient.getInstance().reloadResources();
+ }
+ })
+ .setDefaultValue(defaultConfig.broken_paths)
+ .build());
+
return builder.build();
}
}