From 04503b155395836605f8463f2e71520eabc67bfc Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Tue, 14 Sep 2021 20:43:51 +0300 Subject: Moved cloth config support into OptionalCompat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added a notice screen to config when cloth is not present. --- .../shcm/shsupercm/fabric/citresewn/config/CITResewnModMenu.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/config') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnModMenu.java b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnModMenu.java index 4c3f20a..7a4954c 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnModMenu.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/config/CITResewnModMenu.java @@ -3,13 +3,11 @@ package shcm.shsupercm.fabric.citresewn.config; import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ModMenuApi; import net.fabricmc.loader.api.FabricLoader; +import shcm.shsupercm.fabric.citresewn.OptionalCompat; public class CITResewnModMenu implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { - if (FabricLoader.getInstance().isModLoaded("cloth-config2")) - return CITResewnConfigScreenFactory::create; - - return parent -> null; + return OptionalCompat.getModConfigScreenFactory()::apply; } } -- cgit