This commit is contained in:
Anuken
2019-12-01 12:32:35 -05:00
parent b6915a0483
commit 0e7c403bd8
7 changed files with 27 additions and 8 deletions

View File

@ -17,15 +17,15 @@ public class ScriptStubGenerator{
String base = "io.anuke.mindustry";
Array<String> blacklist = Array.with("plugin", "mod", "net", "io", "tools", "gen");
Array<String> nameBlacklist = Array.with("ClientLauncher", "NetClient", "NetServer");
Array<Class<?>> whitelist = Array.with(Draw.class, Core.class, TextureAtlas.class, TextureRegion.class);
Array<Class<?>> whitelist = Array.with(Draw.class, Core.class, TextureAtlas.class, TextureRegion.class, Time.class);
String fileTemplate = "package io.anuke.mindustry.mod;\n" +
"\n" +
"import io.anuke.arc.collection.*;\n" +
"//obviously autogenerated, do not touch\n" +
"class ClassAccess{\n" +
"public class ClassAccess{\n" +
//"\tstatic final Array<Class<?>> allowedClasses = Array.with($ALLOWED_CLASSES$);\n" +
"\tstatic final ObjectSet<String> allowedClassNames = ObjectSet.with($ALLOWED_CLASS_NAMES$);\n" +
"\tpublic static final ObjectSet<String> allowedClassNames = ObjectSet.with($ALLOWED_CLASS_NAMES$);\n" +
"}";
List<ClassLoader> classLoadersList = new LinkedList<>();