Closed Mumfrey closed 5 years ago
I can definitely arrange a call to launch plugins notifying about impending launch. Not sure what context you'd want here though that you don't already get earlier?
No additional context is required, it's purely a notification that "all the pregame stuff has ended, switch to application". As discussed I will flesh out the Mixin service extension object to receive the mod containers from FML so that the container discovery can be made more robust.
Under LaunchWrapper this point used to be detected via the call to getLaunchArguments
but under ML there is no direct indication that all the pre-launch has completed and to proceed to the next phase.
Preamble
It's taken me a long time to get the new Mixin version to a point where I'm happy with it, mostly due to personal commitments, so I'd like to apologise for the radio silence from my end. The approach I have taken while developing Mixin for ModLauncher is to work around things as they are, since I felt that until I was happy with the engineering of the solution that asking for changes to ModLauncher was frivolous. I wanted to make sure I was asking for the right things.
To this end, I've wrapped the work-arounds and reflection-based shims into a single class which I've named
Internals
. This issue pertains to one of the duties offloaded toInternals
, identifying the moment immediately prior to startup.The Issue
As you may recall, Mixin processing happens in phases in order that Mixins can be loaded, conformed to the current environment, and are then ready for application during the unfolding of the lifecycle phase.
With the current design, Mixin begins the only phase (
DEFAULT
) as the game starts. Mixins which were previously obtained by the platform agents - eg. from FML mod containers, classpath entries, or the command line - are then selected into the environment ready for application.Currently the only way I have discovered to detect this event is via the rather crufty method of log watching, and simply hunting for the "Launching Target" message that ML emits prior to start.
This isn't the most elegant solution in the world, so it would be helpful if either
ILaunchPluginService
orITransformationService
could be notified immediately prior to the call to launch service launch with some kind ofpreLaunch
callback.Would this be possible? I can think of reasons it might not be desirable to put it into
ITransformationService
but if it could be added toILaunchPluginService
that would allow me to nuke this particular hack.