Skip to main content
Version: Minecraft 26.2

API Reference

The per-package pages in this section are generated from the Javadoc in the source code with ./gradlew apiReference. Each page lists the signatures, descriptions, parameters, return values and exceptions of every public type and method in that package.

  • Descriptions are in English, exactly as written in the code.
  • Every API is at the PREVIEW level. It can change between versions.
  • Every type and method shows the release that added it (Since).
  • Do not edit the generated pages by hand. Change the Javadoc in the source, then generate the pages again.

All functions lists every constructor and method in one table, and Additions by release lists what each release added.

For usage and examples by area, see Native API. For stability levels, see API stability.

Package list​

All packages are under dev.polymodloader.api. The names below are the part after that. They are grouped the same way as the sidebar.

Basics​

PackageContents
stabilityThe stability annotation @ApiStability and the levels in StabilityLevel
runtimeGameSide, the kind of Minecraft process Poly Mod Loader is running in
lifecycleThe mod entrypoints (CommonModInitializer, ClientModInitializer, DedicatedServerModInitializer) and ModContext

Content​

PackageContents
contentContent declaration (ContentRegistrar), creative tabs, sounds, entity data keys, advancement triggers
content.blockBlock definitions, behavior, shapes, sounds
content.block.entityBlock entity definitions and ticking, slot layout menus (MenuLayout)
content.block.stateBlock state properties (BlockProperty) and state snapshots (BlockStateView)
content.effectStatus effect definitions and behavior
content.entityMob and projectile definitions, AI goals, movement and riding, natural spawning
content.entity.modelMob box models, part animations, keyframe animations
content.itemItem and food definitions, item data components
content.particleParticle type definitions
content.ruleGame rule keys and categories

Events​

PackageContents
eventEvent keys (EventKey) and listener registration (EventRegistry)
event.blockBlock events (break)
event.entityLiving entity events (allow and modify damage, death)
event.playerPlayer join events (join check, join, leave)
event.serverServer lifecycle events and ServerView
event.worldDimension events (prepare, chunk load and unload)

World and entities​

PackageContents
worldBlock positions and directions, WorldView, world storage (StoredData)
worldgenCode biomes, terrain generators, code placed features, noise functions, code structures
entityViews of entities, living entities, mobs, and players, and damage information
inventoryInventory views and item stacks (snapshots, live stack references)

Server and data​

PackageContents
commandServer command trees, argument types, execution context
permissionPermission nodes and permission providers
networkPayload channels and codecs, exchanges during the join preparation phase
dataData trees saved with the world (DataTree) and migrations
resourceResource IDs and data and asset reload listeners

Client​

PackageContents
clientKey bindings, HUD, mod screens, world and block entity rendering, shader pipelines, dynamic textures, client events

Systems and tools​

PackageContents
systemThe contract for replaceable systems (SystemId, SystemProvider, SystemLookup)
system.brandThe poly:game_brand system (GameBrandSystem)
devtools.gametestGame test registration, running tests, test areas (TestArea)

Page generation​

The repository's tools:api-reference module builds the package pages. When you run ./gradlew apiReference at the repository root, it reads the sources of the public API modules (poly-runtime-api, poly-system-api, poly-event-api, poly-game-api, poly-lifecycle-api) and writes one page per package into this folder (site/docs/api-reference/). Only this page (index.md) is written by hand.

Buy me a coffee