为me接口增加一个升级槽,并且兼容applied flux
This commit is contained in:
parent
6b8590c2f2
commit
66b581c2a7
|
|
@ -81,7 +81,7 @@ dependencies {
|
|||
|
||||
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
|
||||
|
||||
modImplementation "curse.maven:applied-flux-965012:6755986"
|
||||
// modImplementation "curse.maven:applied-flux-965012:6755986"
|
||||
modCompileOnly "curse.maven:mega-cells-622112:${mega_cells_version}"
|
||||
modCompileOnly "curse.maven:jade-324717:${jade_version}"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,12 +27,20 @@ import java.util.List;
|
|||
public class UpgradeSlotCompat {
|
||||
private static final String APPFLUX_MOD_ID = "appflux";
|
||||
|
||||
/**
|
||||
* 检测Applied Flux模组是否存在
|
||||
* @return true如果存在,false如果不存在
|
||||
*/
|
||||
public static boolean isAppfluxPresent() {
|
||||
return ModList.get().isLoaded(APPFLUX_MOD_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测是否应该启用我们的升级卡槽功能
|
||||
* @return true如果应该启用,false如果检测到appflux模组存在
|
||||
*/
|
||||
public static boolean shouldEnableUpgradeSlots() {
|
||||
boolean appfluxExists = ModList.get().isLoaded(APPFLUX_MOD_ID);
|
||||
boolean appfluxExists = isAppfluxPresent();
|
||||
ExtendedAELogger.LOGGER.info("ExtendedAE-appflux模组检测: {}", appfluxExists ? "存在" : "不存在");
|
||||
|
||||
if (appfluxExists) {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ public class MixinConditions implements IMixinConfigPlugin {
|
|||
return true; // 总是加载,在Mixin内部进行运行时检查
|
||||
}
|
||||
|
||||
// 对于InterfaceLogicUpgradesMixin,总是加载但在运行时检查条件
|
||||
if (mixinClassName.contains("InterfaceLogicUpgradesMixin")) {
|
||||
System.out.println("[ExtendedAE_Plus] 总是加载Interface升级Mixin,运行时检查条件: " + mixinClassName);
|
||||
return true; // 总是加载,在Mixin内部进行运行时检查
|
||||
}
|
||||
|
||||
// 其他Mixin正常应用
|
||||
System.out.println("[ExtendedAE_Plus] 加载Mixin: " + mixinClassName);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@
|
|||
"extendedae.container.ContainerExPatternTerminalMixin",
|
||||
"extendedae.container.ContainerWirelessExPatternTerminalMixin",
|
||||
"ae2.helpers.InterfaceLogicChannelCardMixin",
|
||||
"ae2.helpers.InterfaceLogicTickerMixin"
|
||||
"ae2.helpers.InterfaceLogicTickerMixin",
|
||||
"ae2.InterfaceLogicUpgradesMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user