Create a LoadersHolder
LoadersHolder class is responsible to hold models and textures loaders for your mod. These loaders are going to automatically load .obj models and custom sized textures.
- Create instance of the
LoadersHolderclass inside the main classDirectorylibs/
- …
Directorysrc/main/
Directoryjava/your/namespace/your_mod_id/
- …
- ExampleMod.java
Directoryresources/assets/your_mod_id/
Directorytextures/
Directorytesr/
- …
Directorymodels/
Directorytesr/
- …
- …
- …
ExampleMod.java import dev.tauri.jsg.core.client.LoadersHolder;@Mod("your_mod_id")public class ExampleMod implements JSGAddon {public static final LoadersHolder LOADERS_HOLDER = LoadersHolder.getOrCreate("your_mod_id", ExampleMod.class);// ...} - That’s it! No registration needed when the instance is created inside the main class.