use of org.spongepowered.asm.mixin.MixinEnvironment in project Hyperium by HyperiumClient.
the class HyperiumTweaker method injectIntoClassLoader.
@Override
public void injectIntoClassLoader(LaunchClassLoader classLoader) {
Hyperium.LOGGER.info("[Addons] Loading Addons...");
Hyperium.LOGGER.info("Initialising Bootstraps...");
MixinBootstrap.init();
AddonBootstrap.INSTANCE.init();
Hyperium.LOGGER.info("Applying transformers...");
MixinEnvironment environment = MixinEnvironment.getDefaultEnvironment();
Mixins.addConfiguration("mixins.hyperium.json");
if (isRunningOptifine) {
// Switch's to notch mappings
environment.setObfuscationContext("notch");
}
if (environment.getObfuscationContext() == null) {
// Switch's to notch mappings
environment.setObfuscationContext("notch");
}
try {
classLoader.addURL(new File(System.getProperty("java.home"), "lib/ext/nashorn.jar").toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
}
environment.setSide(MixinEnvironment.Side.CLIENT);
}
Aggregations