From b18dc1e5bcfd0724a6ecf0876bdc842846df4422 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Thu, 8 Apr 2021 20:44:25 +0900 Subject: [PATCH 1/2] add ScriptUtil for modified classes --- .patching-mods/ngtlib.patching-mod/modified-classes.txt | 1 + .../ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch diff --git a/.patching-mods/ngtlib.patching-mod/modified-classes.txt b/.patching-mods/ngtlib.patching-mod/modified-classes.txt index b9ea35a8..87b73389 100644 --- a/.patching-mods/ngtlib.patching-mod/modified-classes.txt +++ b/.patching-mods/ngtlib.patching-mod/modified-classes.txt @@ -1,6 +1,7 @@ jp.ngt.ngtlib.NGTCore jp.ngt.ngtlib.command.CommandPermit jp.ngt.ngtlib.io.NGTLog +jp.ngt.ngtlib.io.ScriptUtil jp.ngt.ngtlib.item.craft.RecipeManager jp.ngt.ngtlib.item.craft.ShapedRecipes55 jp.ngt.ngtlib.renderer.model.ModelLoader diff --git a/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch b/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch new file mode 100644 index 00000000..71c7c30a --- /dev/null +++ b/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch @@ -0,0 +1,2 @@ +--- a/jp/ngt/ngtlib/io/ScriptUtil.java ++++ b/jp/ngt/ngtlib/io/ScriptUtil.java \ No newline at end of file From 17bbf92e3bad1c755b4b6cf17e084c12c171c170 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Thu, 8 Apr 2021 20:55:27 +0900 Subject: [PATCH 2/2] remove javax from class loader exclusions --- .../jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch b/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch index 71c7c30a..bac4cc57 100644 --- a/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch +++ b/src/main/ngtlib-patches/jp/ngt/ngtlib/io/ScriptUtil.java.pm.patch @@ -1,2 +1,14 @@ --- a/jp/ngt/ngtlib/io/ScriptUtil.java -+++ b/jp/ngt/ngtlib/io/ScriptUtil.java \ No newline at end of file ++++ b/jp/ngt/ngtlib/io/ScriptUtil.java +@@ -15,11 +15,10 @@ + public final class ScriptUtil { + private static ScriptEngineManager SEM; + + private static void init() { + LaunchClassLoader launchclassloader = Launch.classLoader; +- launchclassloader.addClassLoaderExclusion("javax."); + launchclassloader.addClassLoaderExclusion("jdk.nashorn."); + SEM = new ScriptEngineManager((ClassLoader)null); + } + + private static void showScripts(ScriptEngineManager mng) {