Lodestone

Lodestone

An automatic content loader for Fabric mods.

by
12.4K Downloads
fabriclibraryutility
Rent Server with this Mod

About this Mod

An automatic content loader for Fabric mods.

Usage

In order to use Lodestone directly,
please ensure that you add it as a dependency for your mod.
This mod does not add any content by itself.

Lodestone provides basic interfaces and APIs for
easily registering modded content during initialization.
The most important type provided is the Loaded interface,
which the mod is built around.
For a basic example, see the Cheese mod.

To create an automatically registered type,
simply implement the target environment's associated interface.

/** An item that is loaded at runtime. */
public class LoadedItem extends Item implements CommonLoaded {

    // Required for all instances of `Loaded`. Allows Lodestone to group registered values by mod identifier.
    @Override
    public Identifier getLoaderId() {
        return Identifier.of(YourMod.MOD_ID, "your_item");
    }

    // A function that registers the value at runtime.
    @Override
    public void loadCommon() {
        Registry.register(Registries.ITEM, this.getLoaderId(), this);
    }

}

Each mod environment has its own dedicated interface:

  • CommonLoaded loads the value on the "common" environment, meaning both the client and the server.
  • ClientLoaded only loads the value on the client instance.
  • ServerLoaded only loads the value on the server instance.
  • DataGenerating only loads the value during Fabric's data generation task.

These are intended to be used within each mod initializer to load it properly.

public class YourMod implements ModInitializer {

    public static final String MOD_ID = "your_mod";
    public static final LoadedItem YOUR_ITEM = new LoadedItem(new Settings());

    @Override
    public void onInitialize() {
        // Registers this item for later loading.
        Lodestone.register(CommonLoaded.class, YOUR_ITEM);

        // Which is then done here.
        Lodestone.load(CommonLoaded.class, MOD_ID);
    }

}

Lodestone also provides an abstract class and two annotations for automatic registration of values.

public final class ItemLoader extends AutoLoader {

    @LoadingPriority(-1) // Controls the loading order. In this case, this loads last.
    public static final LoadedItem ITEM_1 = new LoadedItem("item_1", new Settings());
    public static final LoadedItem ITEM_2 = new LoadedItem("item_2", new Settings());
    public static final LoadedItem ITEM_3 = new LoadedItem("item_3", new Settings());
    public static final LoadedItem ITEM_4 = new LoadedItem("item_4", new Settings());
    public static final LoadedItem ITEM_5 = new LoadedItem("item_5", new Settings());

    @IgnoreLoading({ }) // Prevents this value from being loaded.
    public static final LoadedItem NULL = null;

    @Override
    public Identifier getLoaderId() {
        return Identifier.of(YourMod.MOD_ID, "items");
    }

}

This is then registered in a very similar way.

public class YourMod implements ModInitializer {

    public static final String MOD_ID = "your_mod";
    public static final ItemLoader ITEMS = new ItemLoader();

    @Override
    public void onInitialize() {
        // Registers all items for later loading.
        ITEMS.register();

        // Which is then done here.
        Lodestone.load(CommonLoaded.class, MOD_ID);
    }

}

Depending on Lodestone

Lodestone's sole purpose is to be used as a library for other mods.
If you would like to depend on Lodestone for your Fabric mod,
add the following to your Gradle manifest:

# gradle.properties

lodestone_version = 1.8.0
// build.gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    modImplementation "com.github.Jaxydog:Lodestone:${project.lodestone_version}"

    // Or, to alternatively depend on the most recent commit:
    modImplementation 'com.github.Jaxydog:Lodestone:main-SNAPSHOT'
}

Lodestone should work with many older versions of Minecraft,
but only the latest game version is guaranteed to have proper support.
I am currently not interested in backporting to versions prior to roughly 1.18,
but if you encounter any issues feel free to let me know anyway.

Available Versions

Lodestone 1.8.0release
MC 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8fabric
July 30, 2025
Lodestone 1.7.1release
MC 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7fabric
March 9, 2025
Lodestone 1.7.0release
MC 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7fabric
February 26, 2025
Lodestone 1.6.0release
MC 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1fabric
October 5, 2024
Lodestone 1.5.3release
MC 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1fabric
October 4, 2024

How to Install Lodestone on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.8).

3

Install Mod

Open the mod browser in the dashboard and search for "Lodestone". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.8, 1.21.7, 1.21.6 (+21 more)

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Lodestone server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.8). You can switch loaders with one click in the panel.

Is Lodestone compatible with fabric?

Lodestone officially supports fabric for Minecraft 1.21.8, 1.21.7, 1.21.6. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Lodestone – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Lodestone consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Lodestone with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU Lesser General Public License v3.0 or later
Server-side
Optional

Supported Versions

1.21.81.21.71.21.61.21.51.21.41.21.31.21.21.21.11.211.20.6+14 more