diff --git a/Loader/src/main/java/de/com/baseband/launcher/Loader.java b/Loader/src/main/java/de/com/baseband/launcher/Loader.java index 575d96e..53ba358 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/Loader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Loader.java @@ -39,7 +39,7 @@ public class Loader implements Util { public static Class baseBandClass; public enum Response { - OK("OK."), + OK("Auth OK."), FORBIDDEN("Request Forbidden."), OUTDATED("Your Loader is Outdated."), BANNED("Account Banned."), diff --git a/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java b/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java index f217ce5..deabd69 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java +++ b/Loader/src/main/java/de/com/baseband/launcher/Tweaker.java @@ -5,6 +5,7 @@ package de.com.baseband.launcher; +import de.com.baseband.launcher.util.Util; import net.minecraft.launchwrapper.ITweaker; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraftforge.common.ForgeVersion; @@ -21,7 +22,7 @@ import java.util.Map; @SuppressWarnings("unused") @IFMLLoadingPlugin.Name("baseband") @IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion) -public class Tweaker implements ITweaker, IFMLLoadingPlugin { +public class Tweaker implements ITweaker, IFMLLoadingPlugin, Util { public static void loaded(Class baseBandClass) { Loader.loaded(baseBandClass); diff --git a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java index e22f344..c1f5627 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java @@ -1,5 +1,7 @@ package de.com.baseband.launcher.classloader; +import de.com.baseband.launcher.url.ByteURLHandler; +import de.com.baseband.launcher.url.ResourceConnection; import de.com.baseband.launcher.url.URLWrapper; import de.com.baseband.launcher.util.Util; import de.tudbut.parsing.TCN; @@ -29,17 +31,24 @@ public class CustomClassLoader extends ClassLoader implements Util { private final DataKeeper mixinPermissionManager; static { + try { Method m = Arrays.stream(Class.forName("java.lang.ClassLoader").getDeclaredClasses()).filter(x -> x.getSimpleName().equalsIgnoreCase("ParallelLoaders")).findFirst().get().getDeclaredMethod("register", Class.class); m.setAccessible(true); m.invoke(null, CustomClassLoader.class); + LOGGER.info("Patched ClassLoader."); } catch (Exception e) { throw new RuntimeException("unable to patch ClassLoader", e); } } public CustomClassLoader(Map data) { - AccessKiller.killReflectionFor(CustomClassLoader.class, CustomMixinServer.class); + AccessKiller.killReflectionFor( + CustomClassLoader.class, + CustomMixinServer.class, + URLWrapper.class, + ByteURLHandler.class, + ResourceConnection.class); names.addAll(data.keySet()); this.binaryKeeper = new DataKeeper<>(