QDResLoader
Imagine this situation: QSL already has a debugged, fast, and time-tested resource loading system that all mods use. Why create something complex and cumbersome that requires Architectury and breaks at the slightest intervention when you can simply take a ready-made solution?
This is exactly what QDResLoader does. The initial version consisted of only 10 lines of Java code, including formatting:
new File("resources").mkdirs();
for (var t : ResourceType.values()) {
ResourceLoader.get(t).getRegisterTopResourcePackEvent().register((ctx) -> {
ctx.addResourcePack(new ModNioResourcePack(
"QDResLoader resources", mod.metadata(), null, ResourcePackActivationType.ALWAYS_ENABLED,
new File("resources").toPath(), t, null
));
});
}
Since the release of the first version, additional features have been added to improve usability, but the mod still remains compact—just not minimalist enough to completely fit in the description.
Use the power of QSL Resource Loader through the resources folder. The format is already familiar to you: data is placed in data, resources—in assets. Perhaps you have ZIP archives that you don't want to unpack (for example, if you manage them through Packwiz to update packs created by other users)? Simply place them in the packs folder.
On first launch, a QDResLoader-README.txt file will appear in the resources directory with a brief usage guide. Here is its content:
This directory is created and managed by QDResLoader. You can delete this README after creating any of the following structures.
The directory itself is loaded simultaneously as a datapack AND resourcepack, so any pack.mcmeta file will be taken into account (the standard version from QSL is used if the file is missing), and all data from "data" and resources from "assets" on the client will be loaded.
You can also create a "packs" folder and place directories, ZIP, or JAR files there that will be loaded as packs. For organization, you can create separate "datapacks" or "resourcepacks" folders—the contents of these directories will be loaded only as one type of pack instead of both.
Resources in the main directory cannot be disabled by users, but they will be visible in the "Resource Packs" and "Data Packs" menus and can be reordered. Packs in all three folders can be disabled at the user's discretion, but by default they are all active.
JAR files are recognized as packs, so you can take JAR files "datapack-as-mod" and place them here instead of the mods folder if that suits your needs.