Skip to main content
Version: Minecraft 26.2

Native API overview

The Native API is the API that Poly Mods use for Minecraft 26.2. All of it is PREVIEW, and it compiles against poly-lifecycle-api alone, with no Minecraft types. The implementation for each game version lives in Poly Mod Loader's game layer (poly-game-v26_2).

This section collects the most commonly used code and rules for each area. A full example that uses every area in one mod is examples/native-showcase-mod in the Poly Mod Loader source (private for now). That mod is also the reference mod for verifying behavior in the real game.

All APIs are PREVIEW

The 0.1 series has no STABLE API. The first public APIs stay PREVIEW until usage experience confirms them, and they may change between versions. The meaning of each level is in API stability.

Areas​

Packages​

Package (dev.polymodloader.api.…)Contents
lifecycleCommonModInitializer, ClientModInitializer, DedicatedServerModInitializer, ModContext
stabilityApiStability, StabilityLevel — API stability level markers
runtimeGameSide (CLIENT / DEDICATED_SERVER)
system, system.brandSystemId, PolySystem, SystemProvider, SystemContext, SystemLookup, GameBrandSystem — System replacement
event, event.server, event.player, event.block, event.entity, event.world, event.interactionEvent keys and listeners, EventPriority, EventResult — Events
content, content.block, content.block.state, content.block.entity, content.item, content.entity, content.entity.model, content.effect, content.rule, content.particleContent definitions
world, entity, inventory, dataWorld, entity and inventory views, and saved data
tagTagKey, TagRegistry, TagView — Tags and creative tabs
worldgenWorld generation
command, permissionCommands and permissions
networkPayload channels
clientClient registration, screens, drawing
resourceResourceId, reload listeners
devtools.gametestIn-game tests
Buy me a coffee