diff options
| author | Aizistral | 2026-11-19 00:34:05 +0100 |
|---|---|---|
| committer | Aizistral | 2026-11-19 00:34:05 +0100 |
| commit | c65284d96e439a18b0ec4813e7dc632ce09183b5 (patch) | |
| tree | d32f0f2fb532eb90afeddd3c769c7c7bdd3b5b10 /neoforge/src | |
| parent | 42c7c8f37031bd1c6c79ce915bd2290d37697e72 (diff) | |
Register config screen only on client
Diffstat (limited to 'neoforge/src')
| -rw-r--r-- | neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java b/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java index 52c3657..64e9da8 100644 --- a/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java +++ b/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java @@ -30,13 +30,15 @@ public class NoChatReports implements PlatformProvider { NeoForge.EVENT_BUS.addListener(ClientPlayerNetworkEvent.LoggingIn.class, Events::onPlayReady); } - Function<Screen, Screen> configScreenFactory = NCRClient.getConfigScreen(); - if (isOnClient() && configScreenFactory != null) { - ModLoadingContext.get().registerExtensionPoint( - IConfigScreenFactory.class, - () -> (minecraft, parent) -> configScreenFactory.apply(parent) - ); - } + if (this.isOnClient()) { + Function<Screen, Screen> configScreenFactory = NCRClient.getConfigScreen(); + if (configScreenFactory != null) { + ModLoadingContext.get().registerExtensionPoint( + IConfigScreenFactory.class, + () -> (minecraft, parent) -> configScreenFactory.apply(parent) + ); + } + } } @Override |
