From 2fa3699d0440034b23fd769e81c1965a31dd0fe8 Mon Sep 17 00:00:00 2001 From: Reagan Date: Wed, 24 Jun 2026 03:01:30 +1200 Subject: 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 --- .../com/aizistral/nochatreports/neoforge/NoChatReports.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'neoforge/src') 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 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) ); } } -- cgit v1.2.3