修正兼容注册测试

This commit is contained in:
叁玖领域 2026-02-16 21:09:06 +08:00
parent 8ad47ce339
commit 20b795486a
2 changed files with 8 additions and 2 deletions

View File

@ -33,7 +33,7 @@ mod_name=3944Realms 's Lib Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=0.2.0
mod_version=0.2.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View File

@ -255,7 +255,6 @@ public class CommonEventHandler {
// 在Mod总线上发布事件
modBus.post(new RegisterCompatEvent(compatManager));
compatManager.initializeAll();
Lib39.LOGGER.info("RegisterCompatEvent published during construct phase");
});
}
@ -273,6 +272,13 @@ public class CommonEventHandler {
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
// 在这里初始化兼容模块给其他模组足够的时间注册
if (compatManager != null) {
compatManager.initializeAll();
Lib39.LOGGER.info("CompatManager initialized with {} modules",
compatManager.getLoadedCompats().size());
}
});
}