Skip to content

Commit

Permalink
Fix LUMINA incompat (cc #19)
Browse files Browse the repository at this point in the history
  • Loading branch information
makamys committed Oct 27, 2023
1 parent 460f7c9 commit 0d8f0a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/makamys/coretweaks/Compat.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public static boolean isNotFinePresent() {
return Config.class.getResource("/jss/notfine/NotFine.class") != null;
}

public static boolean isLuminaPresent() {
return Config.class.getResource("/com/falsepattern/lumina/api/LumiAPI.class") != null;
}

private static String getModVersion(String className) {
String path = "/" + className.replace('.', '/') + ".class";
try(InputStream is = Compat.class.getResourceAsStream(path)) {
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/makamys/coretweaks/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Config {
public static CloudHeightCheck cloudHeightCheckMode;
@ConfigWrappedEnum(cat="Bugfixes", def=TRUE, com="Fixes graphical glitches that happen after recovering from a game crash, caused by world renderer display lists getting deleted but never reallocated. From 1.12.")
public static FeatureSetting fixDisplayListDelete;
@ConfigWrappedEnum(cat="Bugfixes", def=TRUE, com="Fixes heightmap calculation not including the top layer of 16x16x16 regions, causing lighting errors (MC-7508)")
@ConfigWrappedEnum(cat="Bugfixes", def=TRUE, com="Fixes heightmap calculation not including the top layer of 16x16x16 regions, causing lighting errors (MC-7508)\nCompatibility note: Not compatible with LUMINA, which ostensibly accomplishes the same thing (this feature will be disabled).")
public static FeatureSetting fixHeightmapRange;
@ConfigWrappedEnum(cat="Bugfixes", def=TRUE, com="Fixes an extra food item sometimes getting silently consumed (MC-849)")
public static FeatureSetting fixDoubleEat;
Expand Down Expand Up @@ -363,6 +363,11 @@ private static boolean shouldDisable(FeatureSetting feature) {
LOGGER.info("Disabling cloud height check fix because NotFine is present.");
return true;
}
} else if(feature == fixHeightmapRange) {
if(Compat.isLuminaPresent()) {
LOGGER.info("Disabling heightmap range fix because LUMINA is present.");
return true;
}
}
return false;
}
Expand Down

0 comments on commit 0d8f0a8

Please sign in to comment.