Events/Launch/minified-launch
InstallNeoforgeEvent
Fired continuously while NeoForge is installing
Fields
Current installation phase of the NeoForge installer process
gameVersionStringTarget Minecraft version (e.g., 1.20.1)
loaderVersionStringNeoForge loader version being installed
Types
InstallNeoforgeEvent.Stage
APIPREPARINGInitial environment checks and directory setupDOWNLOADING_INSTALLERFetching required installer binariesRUNNING_INSTALLERExecuting the NeoForge installer processWRITING_PROFILEUpdating the client launcher profile configurationFINISHEDInstallation completed successfullyFAILEDInstallation encountered an error or was abortedWhen it fires
NeoInstallerInjector mirrors ForgeInstallerInjector almost exactly and fires from Launcher.launchMinecraft(...) whenever LaunchConfiguration.loader is a NeoforgeLoader and the launch is online. The stage order is the same as InstallForgeEvent, minus EXTRACTING (which NeoForge's Stage enum doesn't even define):
PREPARING: always first.WRITING_PROFILE: only iflauncher_profiles.jsondoesn't already exist; skipped on repeat launches.DOWNLOADING_INSTALLER: before resolving the NeoForge version and downloading its installer JAR.RUNNING_INSTALLER: before invoking the NeoForge installer via reflection.FINISHEDorFAILED, exactly one of these fires last, mirroring Forge's behavior.
Unlike Forge, NeoForge's installer is invoked with a Predicate<String> for "optional" components that always returns true, so all optional install steps are accepted automatically - there's no event for that decision either.
Listening
Subscribe on the EventBus the event is posted to, see Events for which bus that is.
eventBus.subscribe(InstallNeoforgeEvent.class, event -> {
Stage stage = event.stage();
String gameVersion = event.gameVersion();
String loaderVersion = event.loaderVersion();
});eventBus.subscribe(InstallNeoforgeEvent::class.java) { event ->
val stage = event.stage()
val gameVersion = event.gameVersion()
val loaderVersion = event.loaderVersion()
}Posted by
NeoInstallerInjectorNeoInstallerInjector.java:34NeoInstallerInjectorNeoInstallerInjector.java:43NeoInstallerInjectorNeoInstallerInjector.java:61NeoInstallerInjectorNeoInstallerInjector.java:101NeoInstallerInjectorNeoInstallerInjector.java:167NeoInstallerInjectorNeoInstallerInjector.java:170
API reference: com.dervarex.minified.launch.events.loader.InstallNeoforgeEvent