Skip to content

Register your mod

Modify your main mod class

  • Directorylibs/
  • Directorysrc/main/java/your/namespace/your_mod_id/
    • ExampleMod.java
  • build.gradle
  • gradle.properties
  • setting.gradle
ExampleMod.java
import dev.tauri.jsg.core.JSGAddon;
import dev.tauri.jsg.core.JSGAddons;
@Mod("your_mod_id")
public class ExampleMod implements JSGAddon { // <--- must implement JSGAddon
public ExampleMod(){
// ...
JSGAddons.registerAddon(this);
}
@Override
public String getName() {
return "your mod name";
}
@Override
public String getId() {
return "your_mod_id";
}
@Override
public String getVersion() {
return "your mod version";
}
// --- OPTIONAL ---
@Override
public void onJSGCoreLoad() {
// do stuff
}
}