본문으로 건너뛰기
버전: Minecraft 26.2

dev.polymodloader.api.system

자동 생성

이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.

형식종류설명
PolySystem인터페이스Marker for the contract interface of a replaceable system.
SystemContext레코드Information passed to a SystemProvider when Poly Mod Loader creates the active implementation.
SystemId레코드Identifier of a replaceable Poly Mod Loader system in namespace:path form, e.g.
SystemLookup인터페이스Read access to the active implementation of each system.
SystemProvider함수형 인터페이스Creates the implementation of one system.

PolySystem​

인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public interface PolySystem

Marker for the contract interface of a replaceable system. Every system has exactly one active implementation: Poly Mod Loader's default or one explicit replacement declared by a mod (design doc §4.3, §4.4).

SystemContext​

레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public record SystemContext(SystemId systemId, GameSide side, String providerModId)

Information passed to a SystemProvider when Poly Mod Loader creates the active implementation.

구성 요소타입설명
systemIdSystemIdthe system being created
sideGameSidethe process side
providerModIdStringmod that supplies the provider, or poly for the default

SystemId​

레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public record SystemId(String value)

Identifier of a replaceable Poly Mod Loader system in namespace:path form, e.g. poly:game_brand.

구성 요소타입설명
valueStringthe identifier text

parse(String)​

public static Optional<SystemId> parse(String value)

추가된 버전 0.1.0-alpha.4 또는 그 이전

Parses value, or returns empty when it is not a valid system ID.

인자타입설명
valueString—

반환 Optional<SystemId>

SystemLookup​

인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public interface SystemLookup

Read access to the active implementation of each system.

get(Class<T>)​

<T extends PolySystem> T get(Class<T> contract)

추가된 버전 0.1.0-alpha.4 또는 그 이전

Returns the active implementation of contract.

인자타입설명
contractClass<T>—

반환 T

예외 IllegalArgumentException — when no system with that contract is registered

SystemProvider​

함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public interface SystemProvider<T extends PolySystem>

Creates the implementation of one system. A mod that replaces a system declares its provider class in poly.mod.json under replacesSystems; the class needs a public no-argument constructor.

Timing: called once on the main thread after all mods are resolved and before any mod entrypoint runs.

Failure: an exception, a null result, or a result that does not implement the system's contract stops the launch (POLY-SYSTEM-003).

create(SystemContext)​

T create(SystemContext context)

추가된 버전 0.1.0-alpha.4 또는 그 이전

Creates the system implementation.

인자타입설명
contextSystemContext—

반환 T

Buy me a coffee