use of org.spongepowered.forge.launch.ForgeLaunch in project SpongeCommon by SpongePowered.
the class MainMixin_Forge method forge$initLaunch.
@Inject(method = "<clinit>", at = @At("RETURN"))
private static void forge$initLaunch(final CallbackInfo ci) {
final PluginPlatform pluginPlatform = AppLaunch.pluginPlatform();
final ForgeLaunch launch = new ForgeLaunch(pluginPlatform);
Launch.setInstance(launch);
}
use of org.spongepowered.forge.launch.ForgeLaunch in project SpongeCommon by SpongePowered.
the class MainMixin_Forge method forge$initLaunch.
@Inject(method = "<clinit>", at = @At("RETURN"))
private static void forge$initLaunch(final CallbackInfo ci) {
if (Launch.instance() != null) {
return;
}
final PluginPlatform pluginPlatform = AppLaunch.pluginPlatform();
final ForgeLaunch launch = new ForgeLaunch(pluginPlatform);
Launch.setInstance(launch);
}
use of org.spongepowered.forge.launch.ForgeLaunch in project SpongeCommon by SpongePowered.
the class BootstrapMixin_Forge method forge$startLifecycle.
// @formatter:on
@Inject(method = "bootStrap", at = @At("HEAD"))
private static void forge$startLifecycle(final CallbackInfo ci) {
if (BootstrapMixin_Forge.isBootstrapped) {
return;
}
final ForgeLaunch launch = Launch.instance();
final Stage stage = SpongeGuice.getInjectorStage(launch.injectionStage());
SpongeCommon.logger().debug("Creating injector in stage '{}'", stage);
final Injector bootstrapInjector = launch.createInjector();
final SpongeLifecycle lifecycle = bootstrapInjector.getInstance(SpongeLifecycle.class);
launch.setLifecycle(lifecycle);
lifecycle.establishFactories();
lifecycle.establishBuilders();
lifecycle.initTimings();
}
Aggregations