mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-25 14:34:42 +00:00
Add the rhino script engine
This commit is contained in:
1 parent
ec3cef240c
commit
a5763bc24d
3 files changed
+20
-1
No files matched your search
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import me.eigenraven.lwjgl3ify.Tags;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.spongepowered.asm.launch.GlobalProperties;
|
||||
@@ -24,6 +25,21 @@ public class Lwjgl3ifyCoremod implements IFMLLoadingPlugin {
|
||||
|
||||
public Lwjgl3ifyCoremod() {
|
||||
Config.loadConfig();
|
||||
try {
|
||||
LaunchClassLoader launchLoader = (LaunchClassLoader) getClass().getClassLoader();
|
||||
launchLoader.addClassLoaderExclusion("javax.script");
|
||||
} catch (ClassCastException e) {
|
||||
LOGGER.warn(
|
||||
"Unsupported launch class loader type "
|
||||
+ getClass().getClassLoader().getClass(),
|
||||
e);
|
||||
}
|
||||
// Ensure javax.script.ScriptEngineManager gets loaded
|
||||
try {
|
||||
Class.forName("javax.script.ScriptEngineManager");
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,9 @@ public class JarDiscoverer {
|
||||
if (name == null) {
|
||||
return null;
|
||||
}
|
||||
if (name.contains("module-info.class") || name.startsWith("META-INF/versions/")) {
|
||||
if (name.contains("module-info.class")
|
||||
|| name.startsWith("META-INF/versions/")
|
||||
|| name.contains("org/openjdk/nashorn")) {
|
||||
// Triggers the continue in the loop
|
||||
return "__MACOSX_ignoreme";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user