You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Extensions API is a way to extend Rosepad Loader by adding support for other mod loaders to make porting mods to Rosepad easier.
Extensions API should be able to:
Patch minecraft.jar before launch
Register mods as they were native Rosepad mods
Motivation
As we've seen with modern Minecraft modding, having multiple mod loaders is a hassle. We have mods that only support Fabric, or Forge, or using one of a quadrillion Fabric-Forge compatibility libraries like Architectery. Extensions API aims to remove the need for such compatibility libraries by allowing developers to add support for custom mod loader formats.
Registering a mod
A mod can be marked as an extension by adding main.loader entry to mod.toml
[main]
loader = "net.group.artifact.Extension"
Extension class must extend LoaderExtension class
classExtensionextendsLoaderExtension {
// Custom entry pointpublicclassCustomModEntryimplementsEntryPoint {
privateJarLoaderloader;
publicCustomModEntry(JarLoaderloader) {
this.loader = loader;
}
publicvoidpre(Environmentenv) {
// do stuff
}
publicvoidinit(Environmentenv) {
// do other stuff
}
}
@Overridepublicvoidmain(ExtensionContextcontext) {
for (ModCandidatecandidate : context.candidates()) {
// ...do something with mods...candidate.register(
newRosepadModEntry("modid", "1.0.0")
.setName("Modname")
.addEntryPoint(newCustomModEntry(candidate.getLoader()))
);
// Once a mod has been registered, that candidate will// not appear for any other mod loader
}
Path[] locations = context.patchMinecraftJar(); // Get source and destination// paths for minecraft.jarFiles.copy(locations[0], locations[1]);
}
}
The text was updated successfully, but these errors were encountered:
Overview
Extensions API is a way to extend Rosepad Loader by adding support for other mod loaders to make porting mods to Rosepad easier.
Extensions API should be able to:
minecraft.jar
before launchMotivation
As we've seen with modern Minecraft modding, having multiple mod loaders is a hassle. We have mods that only support Fabric, or Forge, or using one of a quadrillion Fabric-Forge compatibility libraries like Architectery. Extensions API aims to remove the need for such compatibility libraries by allowing developers to add support for custom mod loader formats.
Registering a mod
A mod can be marked as an extension by adding
main.loader
entry tomod.toml
Extension class must extend
LoaderExtension
classThe text was updated successfully, but these errors were encountered: