Skip to content

Commit

Permalink
Fix bugged logic in ASMAPI.getSystemPropertyFlag() (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathing authored Sep 28, 2023
1 parent 303343f commit 611f278
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/net/minecraftforge/coremod/api/ASMAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ private static String map(String name, INameMappingService.Domain domain) {
}

public static boolean getSystemPropertyFlag(final String propertyName) {
return Boolean.getBoolean(System.getProperty("coremod."+propertyName, "TRUE"));
return Boolean.getBoolean("coremod." + propertyName) || getSystemPropertyFlagOld(propertyName);
}

/** @deprecated Contains the old, bugged logic that {@link #getSystemPropertyFlag(String)} used to have. */
@Deprecated(forRemoval = true, since = "5.0")
private static boolean getSystemPropertyFlagOld(final String propertyName) {
return Boolean.getBoolean(System.getProperty("coremod." + propertyName, "TRUE"));
}

public enum InsertMode {
Expand Down

0 comments on commit 611f278

Please sign in to comment.