Skip to content

Commit e65f8fb

Browse files
committed
Add option to override overrides
Absolutely no support is guaranteed when this is used
1 parent 36eb73b commit e65f8fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public class ModernFixEarlyConfig {
3131
private final Map<String, Option> options = new HashMap<>();
3232
private final Multimap<String, Option> optionsByCategory = HashMultimap.create();
3333

34+
private static final boolean ALLOW_OVERRIDE_OVERRIDES = Boolean.getBoolean("modernfix.unsupported.allowOverriding");
35+
3436
public static final boolean OPTIFINE_PRESENT;
3537

3638
private File configFile;
@@ -266,6 +268,9 @@ private void addMixinRule(String mixin, boolean enabled) {
266268
}
267269

268270
private void readProperties(Properties props) {
271+
if(ALLOW_OVERRIDE_OVERRIDES)
272+
LOGGER.fatal("JVM argument given to override mod overrides. Issues opened with this option present will be ignored unless they can be reproduced without.");
273+
269274
for (Map.Entry<Object, Object> entry : props.entrySet()) {
270275
String key = (String) entry.getKey();
271276
String value = (String) entry.getValue();
@@ -288,7 +293,7 @@ private void readProperties(Properties props) {
288293
continue;
289294
}
290295

291-
if(!option.isModDefined())
296+
if(ALLOW_OVERRIDE_OVERRIDES || !option.isModDefined())
292297
option.setEnabled(enabled, true);
293298
else
294299
LOGGER.warn("Option '{}' already disabled by a mod. Ignoring user configuration", key);

0 commit comments

Comments
 (0)