Skip to main content
Version: Minecraft 26.2

API stability

Public types carry a stability level through the @ApiStability annotation in the code. If this page and the code disagree, the code is correct.

No API is STABLE yet

The first public API stays PREVIEW until it has been used in practice. All Native APIs that mods use are PREVIEW and can change between versions.

Levels​

LevelMeaning
STABLEAPI with a compatibility promise (none yet)
PREVIEWPublic API that can change
VERSION_BOUNDImplementation tied to a specific Minecraft version
INTERNALFor Poly Mod Loader internals. Mods must not use it
UNSAFERisky feature that changes the game directly

Behavior categories​

These show what each type can do: READ, WRITE, REGISTER, EXTEND, REPLACE, INTERCEPT, TRANSFORM, MIGRATE, INSPECT, and OBSERVE for events.

Summary by area​

All types are under dev.polymodloader.api and have the level PREVIEW.

AreaMain typesTiming and thread
LifecycleCommonModInitializer, ClientModInitializer, DedicatedServerModInitializer, ModContextDependency order, main thread, before the game main
EventsEventKey, EventRegistry, ServerEvents, ServerViewRegister at any time (thread-safe). Server events run on the server thread
SystemsSystemId, SystemProvider, SystemLookup, GameBrandSystemProviders: main thread, once before entrypoints
ContentContentRegistrar, BlockDefinition, ItemDefinition, BlockBehavior, ItemBehavior, CreativeTab, ResourceIdDeclaration: common entrypoint. Behavior: world thread, both sides
Block state and block entitiesBlockProperty, BlockStateView, BlockEntityDefinition, BlockEntityView, MenuLayout, InventoryViewWorld thread. Ticks: server thread
Item dataItemComponentKey, ComponentType, ItemStackRefWorld thread
World and entitiesWorldView, EntityView, LivingEntityView, MobView, PlayerView, StoredData, DataTreeWorld thread, valid only during the callback. Changes happen on the server
Mobs and gameplayEntityDefinition, AiGoal, ProjectileDefinition, EffectDefinition, GameRuleKey, AdvancementTriggerServer thread (behavior)
World generationWorldgenRegistrar, BiomeSelector, BiomeDefinition, TerrainGenerator, ColumnBuilderCommon entrypoint. Terrain generator: world generation threads (concurrent calls)
Commands and permissionsCommandRegistrar, CommandNode, CommandContext, CommandSource, PermissionRegistrar, PermissionNode, PermissionProviderServer thread. Installed at each server start and /reload
NetworkNetworkRegistrar, PayloadChannel, PayloadCodecSend: server/client thread. Codec: network thread (no game state access)
ClientClientRegistrar, KeyBinding, HudCanvas, ClientView, ModScreen, BlockEntityCanvas, DynamicTexture, ClientEventsClient thread. HUD, drawing, field of view: render thread, every frame
ResourcesResourceRegistrar, ResourceReloadListener, BinaryReloadListenerReload apply thread
Storage and syncEntityDataKey, EntityDataOptions, StorageOptions, DataMigrationServer thread. The client gets a read-only copy
Game testsGameTestRegistrar, GameTestContext, TestAreaServer thread of the game test server

Internal APIs​

PackageLevel
dev.polymodloader.internal.transform.* (transform rules)INTERNAL. Mods cannot use it yet. Mods declare transforms with transforms in poly.mod.json
dev.polymodloader.game.version.* (version adapter contract)INTERNAL
Version adapters and game layersVERSION_BOUND

The status of each poly.mod.json field is in the poly.mod.json schema.

Buy me a coffee