[API] Prepare Workspace - Keksuccino/Spiffy-HUD GitHub Wiki

0. About

To be able to write extension mods for Spiffy HUD, you will first need to prepare your workspace for it.

1. The Dependencies

Every Spiffy extension mod depends on two other mods: Spiffy HUD and Konkrete.

1.1. The mods.toml File

You need to add at least Spiffy HUD to the mod dependencies of your mods.toml file.

Just add this section at the bottom of your mods.toml file and replace your_mod_id with the actual mod ID of your mod:

[dependencies.your_mod_id](/Keksuccino/Spiffy-HUD/wiki/dependencies.your_mod_id)
modId="spiffyhud"
mandatory=true
ordering="AFTER"
versionRange="[1.4.4,)"
side="CLIENT"

1.2. Workspace

You need to include deobfuscated builds of Spiffy HUD and Konkrete as libraries in your workspace. You can compile the sources by yourself using the GitHub pages of Spiffy HUD and Konkrete, or you just use the dev builds on the CurseForge pages of both mods. These dev builds are uploaded as additional file for every normal build. You can identify dev builds by the the name prefix dev_.

1.3. The run Directory

It's needed for some mod loader/MC versions to add dependency mods to the mods directory of your IDEs run directory.

If you're getting a missing mod error when starting your IDEs' MC instance, just add the mods to the mods dir.

2. Verifying The Dependencies

After adding all dependencies, try to call CustomizationItemRegistry.registerItem() to see if everything works correctly.

If your workspace finds the class, you're done and can start writing extension mods for Spiffy HUD!