Three steps to your first mod
Get the template
Download the mod template from this site, unzip it, and run initPolyMod with your mod ID. Gradle fetches Poly Mod Loader itself.
initPolyMod -PmodId=ruby_modDeclare your mod
Fill in poly.mod.json and the entrypoint, then declare blocks and items in code.
buildCheck it in the game
Play it in the client, or run your game tests on a test server without a window.
gameTests "-PpolyTests=ruby_mod:*"
What you can make with the Native API
Full API reference- Blocks and itemsState properties, block entities and menus, data components, food, projectiles
- Mobs and entitiesAI goals, box models and keyframe animation, mounts, natural spawning, damage
- World and eventsWorld storage, scheduled tasks, block, entity, player and server events
- World generationCode biomes and terrain, density functions, code features and structures, dimensions
- Commands and networkingCommand trees and permissions, payload channels, data synced to clients
- ClientKey bindings, HUD, mod screens, block entity painting, shaders, dynamic textures
- Resources and operationsReload listeners, data version migration, automatic world backups
- In-game testsCheck behavior with mock players and test areas, and see the results in Gradle
Design principles
No game types in the API
Mods see only poly-game-api. Poly Mod Loader's game layer implements it for each Minecraft version.
Failures come with error codes
A wrong declaration fails in its entrypoint, with a POLY-… code that says what to fix.
Checked game patches
Poly Mod Loader changes game code only through declared rules, and refuses rules that conflict.