From 5d984f653e51f9ab893068a7a5c332b0efd6b44e Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:04:29 -0400 Subject: [PATCH] Don't log error if NO_GROUP field is missing Fixes error message in log with Connector --- .../modernfix/platform/forge/ModernFixPlatformHooksImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java b/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java index b75ed47f3..fb896bf55 100644 --- a/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java +++ b/forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java @@ -187,6 +187,8 @@ public void injectPlatformSpecificHacks() { noGroupField.setAccessible(true); InjectorGroupInfo noGroup = (InjectorGroupInfo)noGroupField.get(null); groupMembersField.set(noGroup, new DummyList<>()); + } catch(NoSuchFieldException ignored) { + // Connector will replace FML's mixin with one which already has the fix, don't bother logging } catch(RuntimeException | ReflectiveOperationException e) { ModernFixMixinPlugin.instance.logger.error("Failed to patch mixin memory leak", e); }