Skip to content

Creating a subloader

Olafcio1 edited this page Oct 9, 2026 · 2 revisions

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.


  1. Create a java class;
    You can pick any location within your project source code directory.

  2. Paste the following code:

    package com.example.avoidtmpl;
    
    import pl.olafcio.avoid_loader.subloaders.ILoader;
    
    public class LoaderTest 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.

  3. Add your loader to your avoid.mod.json file;
    For example, like this:

    image


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


    🧳 v1.25 -> v1.26
    🧳 v1.26 -> v1.27
    🧳 v1.27 -> v1.28

Clone this wiki locally