diff --git a/src/main/java/yalter/mousetweaks/Main.java b/src/main/java/yalter/mousetweaks/Main.java index 77fa47a..3a97238 100644 --- a/src/main/java/yalter/mousetweaks/Main.java +++ b/src/main/java/yalter/mousetweaks/Main.java @@ -51,21 +51,6 @@ public static void initialize() { } private static void updateScreen(Screen newScreen) { - // Workaround for Architectury wrapping the screen for the mouse drag handler. - // https://github.com/architectury/architectury-api/issues/152 - if (newScreen.getClass().getName().equals("dev.architectury.impl.fabric.ScreenInputDelegate$DelegateScreen")) { - try { - Field field = newScreen.getClass().getDeclaredField("parent"); - field.setAccessible(true); - newScreen = (Screen) field.get(newScreen); - } catch (Exception e) { - if (Config.debug) { - Logger.Log("Error unwrapping Architectury's DelegateScreen."); - e.printStackTrace(); - } - } - } - if (newScreen == openScreen) return;