From 371dbb97c78790820c0edab3dcbde816a23993b1 Mon Sep 17 00:00:00 2001 From: MORIMORI0317 Date: Wed, 26 Jul 2023 07:42:54 +0900 Subject: [PATCH] 2.1.2 --- .../gmrg/forge/GameMenuRemoveGFARBForge.java | 13 +------------ gradle.properties | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/forge/src/main/java/net/morimori0317/gmrg/forge/GameMenuRemoveGFARBForge.java b/forge/src/main/java/net/morimori0317/gmrg/forge/GameMenuRemoveGFARBForge.java index 9a7dc18..6e3ca6c 100644 --- a/forge/src/main/java/net/morimori0317/gmrg/forge/GameMenuRemoveGFARBForge.java +++ b/forge/src/main/java/net/morimori0317/gmrg/forge/GameMenuRemoveGFARBForge.java @@ -16,7 +16,6 @@ public class GameMenuRemoveGFARBForge { private static final String FORGE_MOD_ID = "forge"; private static final String MINECRAFT_MOD_ID = "minecraft"; - private static final String NEO_FORGE_DISPLAY_NAME = "NeoForge"; private static final DefaultArtifactVersion EXIST_MOD_BUTTON_FORGE_VERSION_1194 = new DefaultArtifactVersion("45.1.15"); private static final DefaultArtifactVersion EXIST_MOD_BUTTON_FORGE_VERSION_1201 = new DefaultArtifactVersion("47.1.25"); private static final DefaultArtifactVersion MC_1194_VERSION = new DefaultArtifactVersion("1.19.4"); @@ -31,16 +30,13 @@ public class GameMenuRemoveGFARBForge { return new DefaultArtifactVersion(forgeMod.versionString()); }); private static final Supplier CURRENT_MC_VERSION = Suppliers.memoize(() -> new DefaultArtifactVersion(ModList.get().getModFileById(MINECRAFT_MOD_ID).versionString())); - private static final Supplier NEO_FORGE = Suppliers.memoize(GameMenuRemoveGFARBForge::isNeoForge); public GameMenuRemoveGFARBForge() { ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (remote, isServer) -> true)); } public static boolean existModButton() { - if (NEO_FORGE.get()) { - return false; - } + DefaultArtifactVersion currentForgeVersion = CURRENT_FORGE_VERSION.get(); @@ -61,11 +57,4 @@ public static boolean existModButton() { return currentForgeVersion.compareTo(existVersion) >= 0; } - - private static boolean isNeoForge() { - return ModList.get().getMods().stream() - .filter(it -> FORGE_MOD_ID.equals(it.getModId())) - .limit(1) - .anyMatch(it -> NEO_FORGE_DISPLAY_NAME.equals(it.getDisplayName())); - } } diff --git a/gradle.properties b/gradle.properties index 56eb25d..5e6d7e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ enabled_platforms=fabric,forge #Mod mod_display_name=GameMenuRemoveGFARB archives_base_name=gamemenuremovegfarb -mod_version=2.1.2+pre.1 +mod_version=2.1.2 #Dependencies fabric_loader_version=0.14.17 fabric_api_version=0.76.0+1.19.4