dev.polymodloader.api.event.lifecycle
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
LifecycleEvents | 클래스 | Mod lifecycle events: points in the game's start that are not tied to a server or a world. |
ModsInitializedListener | 함수형 인터페이스 | Called once on the game's main thread after every mod, of every loader, has been initialised. |
LifecycleEvents
클래스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.10
public final class LifecycleEvents
Mod lifecycle events: points in the game's start that are not tied to a server or a world.
Poly Mods' entrypoints run before Minecraft starts. Mods of other loaders (Fabric) initialise where their own loader runs them, inside Minecraft's start (ADR-0020). MODS_INITIALIZED is the point after both, so a Poly Mod that uses another loader's mod can wait for it there.
| 상수·필드 | 타입 | 설명 |
|---|---|---|
MODS_INITIALIZED | EventKey<ModsInitializedListener> | Every mod has been initialised: the Poly Mods' entrypoints and the other loaders' mods' own initialisers (Fabric: main and the side's entrypoint). Fired once per game start, on the game's main thread, at Minecraft's mod initialisation point: after Minecraft's bootstrap (registries exist and are not frozen yet), before the client window or the server starts. The point is the same whether or not mods of other loaders are installed. Register the listener in an entrypoint; a listener registered after the event fired is never called. |
ModsInitializedListener
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.10
public interface ModsInitializedListener
Called once on the game's main thread after every mod, of every loader, has been initialised. See LifecycleEvents.MODS_INITIALIZED for when exactly.
Failure: a listener that throws is reported with the mod ID and disabled (POLY-EVENT-001); the game keeps starting.
onModsInitialized()
void onModsInitialized()
추가된 버전 0.1.0-alpha.10
Handles the event.