Don't log error if NO_GROUP field is missing

Fixes error message in log with Connector
This commit is contained in:
embeddedt 2023-10-28 20:04:29 -04:00
parent 89dab59980
commit 5d984f653e
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -187,6 +187,8 @@ public class ModernFixPlatformHooksImpl implements ModernFixPlatformHooks {
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);
}