Skip to content

Commit

Permalink
Change expected package name for Lithium, see #173
Browse files Browse the repository at this point in the history
  • Loading branch information
malte0811 committed Oct 12, 2024
1 parent f3a4b3f commit 6243f65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
public abstract class FerriteMixinConfig implements IMixinConfigPlugin {
protected static final Logger LOGGER = LogManager.getLogger("ferritecore-mixin");
private static final boolean HAS_LITHIUM;
private static final boolean HAS_ROADRUNNER;

static {
HAS_LITHIUM = hasClass("me.jellysquid.mods.lithium.common.LithiumMod");
HAS_ROADRUNNER = hasClass("me.jellysquid.mods.lithium.common.RoadRunner");
HAS_LITHIUM = hasClass("net.caffeinemc.mods.lithium.common.LithiumMod");
}

private String prefix = null;
Expand Down Expand Up @@ -143,19 +141,13 @@ private static boolean hasClass(String name) {

protected enum LithiumSupportState {
NO_CONFLICT,
INCOMPATIBLE,
APPLY_IF_ROADRUNNER;
INCOMPATIBLE;

private boolean shouldApply() {
return switch (this) {
case NO_CONFLICT -> true;
case INCOMPATIBLE -> !HAS_LITHIUM;
case APPLY_IF_ROADRUNNER -> !HAS_LITHIUM || HAS_ROADRUNNER;
};
}
}

static String test(Map<String, String> m, String k) {
return m.get(k);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

public class Config extends FerriteMixinConfig {
public Config() {
super(FerriteConfig.THREADING_DETECTOR, LithiumSupportState.APPLY_IF_ROADRUNNER, true);
super(FerriteConfig.THREADING_DETECTOR, LithiumSupportState.INCOMPATIBLE, true);
}
}

0 comments on commit 6243f65

Please sign in to comment.