调整兼容触发事件
This commit is contained in:
parent
0d5cef1a64
commit
70ce25d158
|
|
@ -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.3.0
|
||||
mod_version=0.3.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
|
||||
|
|
|
|||
|
|
@ -36,15 +36,9 @@ public abstract class CompatManager {
|
|||
|
||||
protected void initialize() {
|
||||
modEventBus.addListener(this::onConstructMod);
|
||||
modEventBus.addListener(this::onFMLCommonSetup);
|
||||
}
|
||||
|
||||
private void onConstructMod(FMLConstructModEvent event) {
|
||||
event.enqueueWork(() -> {
|
||||
Lib39.LOGGER.info("[{}]: RegisterCompatEvent published during construct phase", this.getId());
|
||||
});
|
||||
}
|
||||
private void onFMLCommonSetup(FMLCommonSetupEvent event) {
|
||||
event.enqueueWork(() -> {
|
||||
initializeAllCompat();
|
||||
Lib39.LOGGER.info("[{}]: CompatManager initialized with {} modules", this.getId(), getLoadedCompats().size());
|
||||
|
|
@ -162,7 +156,7 @@ public abstract class CompatManager {
|
|||
pendingTasks.forEach(Runnable::run);
|
||||
pendingTasks.clear();
|
||||
|
||||
// 1. 先初始化所有兼容模块
|
||||
// 初始化所有兼容模块
|
||||
for (Map.Entry<ResourceLocation, ICompat> entry : compats.entrySet()) {
|
||||
try {
|
||||
entry.getValue().initialize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user