From 20b795486abfb31f72b7815271bbcd0c064f4f69 Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Mon, 16 Feb 2026 21:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=BC=E5=AE=B9=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../r3944realms/lib39/core/event/CommonEventHandler.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3bbaa11..b4216fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/src/main/java/top/r3944realms/lib39/core/event/CommonEventHandler.java b/src/main/java/top/r3944realms/lib39/core/event/CommonEventHandler.java index 50c7b00..5a6f50b 100644 --- a/src/main/java/top/r3944realms/lib39/core/event/CommonEventHandler.java +++ b/src/main/java/top/r3944realms/lib39/core/event/CommonEventHandler.java @@ -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()); + } }); }