Expand the AwfulHacks series

This commit is contained in:
Zoë
2022-07-06 00:51:47 -07:00
parent 36ceabd749
commit 10d44ce217
8 changed files with 216 additions and 165 deletions
@@ -11,8 +11,8 @@ import java.net.URL;
*
* This will likely not work on Gson because FabricLoader has some special logic related to Gson.
*/
public final class PreLaunchHacks {
private PreLaunchHacks() {}
public final class AwfulQuiltHacks {
private AwfulQuiltHacks() {}
private static final ClassLoader KNOT_CLASSLOADER = Thread.currentThread().getContextClassLoader();
private static final Method ADD_URL_METHOD;
@@ -13,7 +13,7 @@ public class QuiltPreLaunchEntryPoint implements PreLaunchEntrypoint {
public void onPreLaunch(ModContainer mod) {
if (QuiltLoader.isDevelopmentEnvironment()) {
try {
PreLaunchHacks.hackilyLoadForMixin(BrigadierMappingBuilder.class.getName());
AwfulQuiltHacks.hackilyLoadForMixin(BrigadierMappingBuilder.class.getName());
} catch(ClassNotFoundException | InvocationTargetException | IllegalAccessException e) {
throw new RuntimeException(e);
}