From 87e7c92526ac894525079305932de80f20372679 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Fri, 19 Aug 2022 19:23:39 +0200 Subject: integrate with forge chat event (#106) --- .../oneconfig/internal/plugin/OneConfigMixinPlugin.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin') diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java b/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java index e272932..e242e2f 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/internal/plugin/OneConfigMixinPlugin.java @@ -67,8 +67,13 @@ public class OneConfigMixinPlugin implements IMixinConfigPlugin { @Override public List getMixins() { + ArrayList mixins = new ArrayList<>(); + if (Platform.getInstance().getLoader().equals(Platform.Loader.FORGE)) { + mixins.add("EventBusMixin"); + } else if (Platform.getInstance().getLoader().equals(Platform.Loader.FABRIC)) { + mixins.add("NetHandlerPlayClientMixin"); + } if (Platform.getInstance().getMinecraftVersion() >= 11600) { - ArrayList mixins = new ArrayList<>(); if (Platform.getInstance().getLoader() == Platform.Loader.FORGE) { mixins.add("ClientModLoaderMixin"); } else { @@ -80,9 +85,8 @@ public class OneConfigMixinPlugin implements IMixinConfigPlugin { mixins.add("MouseMixin"); mixins.add("TickTimeTrackerMixin"); return mixins; - } else { - return null; } + return mixins.isEmpty() ? null : mixins; } @Override -- cgit