Getting Started

Initializing your Mod

Learn how to setup your mod and access Balm's features.
This page assumes you have a working multi-loader Gradle setup with Balm installed. See the previous page if you don't.

Initializing your Mod

Your mod loader entrypoints will reference your mod's main class. This class usually just has a static initialize(BalmRegistrars registrars) method that you can use to register all content in your mod and define any event handlers you need.

common/src/main/java/Waystones.java
public class Waystones {
    public static final String MOD_ID = "waystones";

    public static void initialize(BalmRegistrars registrars) {
        // Register your content using the methods on the registrars instance
        // e.g. registrars.blocks(ModBlocks::initialize);

        // Register event handlers for any of Balm's common callbacks
        ServerPlayerCallback.Join.EVENT.register(player -> {
            System.out.println("Player " + player + " has just joined the game!");
        });
    }
}