Repository navigation
Creating a subloader
This guide assumes you've already created and setup an Avoid project.
§ Making a subloader with the Avoid Framework
Subloaders are kind of extensions to the Avoid mod loader.
Not only that - since v1.28 brought pre-mod-loading, they are even kind of extensions to the running platform!
Subloaders by themselves work on all platforms Avoid supports: Fabric, NeoForge, Sponge and Paper.
However, Sponge and Paper don't have all the fancy stuff implemented-that is, PreModLoader#addToClassPath, PreModLoader#addTransformer and mixins.
-
Create a java class;
You can pick any location within your project source code directory. -
Paste the following code:
package com.example.avoidtmpl; import pl.olafcio.avoid_loader.subloaders.ILoader; public class MyLoader implements ILoader { @Override public void load() { // here should be the stuff that loads after all Avoid addons have been collected } // you can optionally override `processAvoidMod`, to have a function invoked for each Avoid addon loaded. // it runs after your `load` method. }
Of course you need to replace the class name and package.
-
Add your loader to your
avoid.mod.jsonfile;
For example, like this:

©️ Copyright 2026 Olafcio (on behalf of the AvoidLib org)
📝 All Rights Reserved
Avoid Framework
🏚️ 1. Home
📽️ 2. Creating your mod
🌄 3. Adding assets to your mod
🧊 4. Creating a block
💧 5. Creating a fluid
✏️ 6. Creating an item
🎯 7. Creating an entity selector
🤖 8. Creating a command
⌨️ 9. Creating a keybind
🐺 10. Creating an entity
🌫️ 11. Creating a fog
🔩 12. Creating an item component
🔮 13. Creating an effect
📚 14. Language support & adding libraries
🚩 15. Deprecation rules
⏳ 16. Loading philosophy
🔀 17. Adding mixins
🌀 18. Creating a subloader
Migrations