Add-on Development
From DragonMineZ Wiki
Add-on development means writing your own Forge mod that depends on DragonMineZ and reacts to it: granting bonus TP, listening for form changes, adding new quest objective and reward types, adding buttons to the utility menu and so on. These pages are for Java developers who can run a Forge 1.20.1 development environment.
If you only want to tune numbers or add races, forms, quests or wishes, you don't need any of this: see Modding instead. DragonMineZ has no Java API to register new races, forms, skills or techniques; new races and forms are added through JSON config files.
Guides
Who these pages are for, the two ways to extend DMZ and the baseline setup.
Toolchain versions, incompatible mods and what an add-on can safely rely on.
Every DMZ event, reading player state, extension registries and networking.
Set up the Gradle project, declare the dependency and receive your first event.
The project
Report bugs, suggest features, build the mod and open pull requests.
How to report a vulnerability and how to keep a server safe.
Reading order
- Add-on Getting Started: match the toolchain and make sure your development environment builds against DMZ.
- Implementation and Events: wire up the actual hooks.
- Creating a DMZ Addon: the full Gradle and
mods.tomlsetup.
Ground rules for add-ons
- Hook
com.dragonminez.commonalmost exclusively: it is the shared, most stable layer. On the client, the only hooks meant for add-ons areDMZClientEventand the utility menu slots. - Prefer reacting to DMZ events (changing their settable fields, or cancelling them) over changing DMZ data directly.
- Register your own network channel; never add packets to DMZ's channel.
- Never trust client input for stats, unlocks, quests, wishes or progression: validate it on the server.
- Don't depend on
com.dragonminez.mixinclasses or on DMZ internals that the guides don't mention; they can change without notice between versions. - Don't bundle or depend on Legendary Tooltips, Epic Fight or Better Combat: DMZ refuses to start alongside them.