summaryrefslogtreecommitdiffstats
path: root/neoforge/src/main/java/com
diff options
context:
space:
mode:
authorReagan2026-06-24 03:01:30 +1200
committerGitHub2026-06-23 17:01:30 +0200
commit2fa3699d0440034b23fd769e81c1965a31dd0fe8 (patch)
treeb826380dc0dcdbc855a20f8216bb9114a97fb1b6 /neoforge/src/main/java/com
parent6ae2536dfe3e89bb88a952a7e02dea0a2b4c6f7c (diff)
Update to 26.2 (#551)
* Bump version numbers for 26.2 * Update Minecraft references to 26.2 * Remove JAVA_25 compatibility specified in Mixin configs for Forge Not sure why Forge broke it, but e.g. 50ap5ud5/BoatItemView@8b699cc6247d9ae80febdd638f102b0ed38b1873 does the same. * Remove Cloth Config from Forge Cloth Config on Forge is dead: shedaniel/cloth-config#322 and doesn't work, attempting to open the Config screen doesn't work and logs an Exception. Still keep it on NeoForge. * NeoForge: Add Cloth Config as optional dependency for modrinth/cf * (Neo)Forge: Remove local modmenu dependency Neither of these loaders use it anyway, Fabric uses a non-local version. * NeoForge: Switch back to online Cloth Config API artifact This uses the latest version makes runClient configuration work again. * build.gradle: cleanup repositories * Fix Forge build * Use NeoForge Cloth Config for Forge build * List tibequadorian and xbjfk as contributors * List Cloth Config Forge port in project relations --------- Co-authored-by: Aizistral <admin@aizistral.com>
Diffstat (limited to 'neoforge/src/main/java/com')
-rw-r--r--neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java13
1 files changed, 7 insertions, 6 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 680a74d..5f5bbf0 100644
--- a/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java
+++ b/neoforge/src/main/java/com/aizistral/nochatreports/neoforge/NoChatReports.java
@@ -1,11 +1,10 @@
package com.aizistral.nochatreports.neoforge;
-import com.aizistral.nochatreports.common.NCRClient;
import com.aizistral.nochatreports.common.NCRCore;
+import com.aizistral.nochatreports.common.config.ClothConfigIntegration;
import com.aizistral.nochatreports.common.platform.PlatformProvider;
import com.aizistral.nochatreports.common.platform.events.ClientEvents;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.fml.ModLoadingContext;
@@ -18,18 +17,20 @@ import net.neoforged.fml.loading.FMLPaths;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
import java.nio.file.Path;
-import java.util.function.Function;
@Mod("nochatreports")
public class NoChatReports implements PlatformProvider {
public NoChatReports() {
NCRCore.awaken(this);
- Function<Screen, Screen> configScreenFactory = NCRClient.getConfigScreen();
- if (isOnClient() && configScreenFactory != null) {
+ if (isOnClient()) {
+ if (!ClothConfigIntegration.ACTIVE) {
+ NCRCore.LOGGER.warn("ClothConfig API not found, cannot provide config screen factory.");
+ return;
+ }
ModLoadingContext.get().registerExtensionPoint(
IConfigScreenFactory.class,
- () -> (minecraft, parent) -> configScreenFactory.apply(parent)
+ () -> (minecraft, parent) -> ClothConfigIntegration.getConfigScreen(parent)
);
}
}