Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert: 在未安装 Emi 时屏蔽 Jei 插件 #1275

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class AnvilCraftMixinPlugin implements IMixinConfigPlugin {
private static boolean hasZetaPiston = false;
private static final boolean hasCreate = false;
private static boolean hasReiScreen = false;
private static boolean hasEmi = false;

private boolean isLoaded(String clazz) {
return AnvilCraftMixinPlugin.class.getClassLoader().getResource(clazz) != null;
Expand All @@ -27,7 +26,6 @@ public void onLoad(String mixinPackage) {
!= null;
hasZetaPiston = this.isLoaded("org/violetmoon/zeta/piston/ZetaPistonStructureResolver.class");
hasReiScreen = this.isLoaded("me/shedaniel/rei/impl/client/gui/screen/DefaultDisplayViewingScreen.class");
hasEmi = this.isLoaded("dev/emi/emi/EmiPort.class");
}

@Override
Expand All @@ -39,7 +37,6 @@ public String getRefMapperConfig() {
public boolean shouldApplyMixin(String targetClassName, @NotNull String mixinClassName) {
if (mixinClassName.endsWith("PistonStructureResolverMixin")) return !hasZetaPiston;
if (mixinClassName.endsWith("DefaultDisplayViewingScreenMixin")) return hasReiScreen;
if (mixinClassName.endsWith("PluginCallerMixin")) return !hasEmi;
if (mixinClassName.startsWith("dev.dubhe.anvilcraft.mixin.integration.create.")) {
return hasCreate;
}
Expand Down
Loading