Low Code Addons - MWall541/Dragon-Mounts-Legacy GitHub Wiki
Addon Example
This repository features a complete and working example of an addon for DM:L. It implements a completely new Dragon Breed with all possible options using ZERO code; a little bit of json work, and file management, is all it takes. Find it here.
DM:L uses a combination of both data and assets in order to achieve creating new breeds. Data describes the breed's characteristics and logic (such as colors or habitats) and the assets describe the textures and models (such as bodies, saddles, and dragon eggs.)
While it is possible to achieve this by using both a datapack and resourcepack, it's quite inconvenient when making new worlds, distributing it to players, etc. Which is why I highly recommend making your addon a Forge "lowcode" Mod.
"lowcode" mod
A "lowcode" mod is basically what it says on the tin. lowcode. Or no code at all, more likely. To Achieve this, your files need to be archived as a jar, which is pretty trivial if you've made it this far anyway. Just package your files inside a zip and rename the file extension to .jar. Yes, it's safe, and it does work, and yes, I realize it's not ideal, but it's better than before.
Once your lowcode mod is finished, it should be packaged as shown:
-- example_addon.jar
| -- META-INF/
| -- assets/
| -- data/
| -- pack.mcmeta
All README.md can be scrapped as they are not necessary to be in your packaged jar.
The most basic example for an implementation where a breed, and it's egg is implemented would be as follows:
-- example.addon.jar
| -- pack.mcmeta
| -- META-INF/
| -- mods.toml
| -- assets/
| -- example_addon/
| -- lang/
| -- en_us.json
| -- models/
| -- block/
| -- dragon_eggs/
| -- example_breed_dragon_egg.json
| -- textures/
| -- block/
| -- example_breed_dragon_egg.png
| -- entity/
| -- dragon/
| -- example_breed/
| -- body.png
| -- saddle.png
| -- data/
| -- example_addon/
| -- dragonmounts/
| -- dragon_breeds/
|-- example_breed.json
As a visualization, the example above implements the bare minimum. A breed is registered as well as its accompanying dragon egg, everything is textured, and in theory, could play just fine in game. As long as a habitat is specified in example_breed.json, it is possible to obtain our new breed. Of course, there are other areas to add and change to further customize our new breed, this is just a working example.
The actual example pack featured here in comparison explores every customization option available.
So to speak, anyway. Datapacks allow for some creative stuff, so technically the limits come down to you. Of course, if there are any roadblocks, I encourage you to bring them to see if I can add more to this. I'm actively looking for more customization options so please speak up!