Skip to content

Commit e802f93

Browse files
Aizistrallitetex
andauthored
Merge 1.21.7 ModMenuApi fix (#535)
* Fix ModMenuApi implementation (#528) * Build 1.21.8-v2.15.0 coming right up * Add 1.21.8 to supported Minecraft versions --------- Co-authored-by: litetex <40789489+litetex@users.noreply.github.com>
1 parent 0c51b46 commit e802f93

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ curseforge {
157157
changelog = file('docs/CHANGELOG.md')
158158
mainArtifact(remapJar)
159159

160+
addGameVersion "1.21.8"
160161
addGameVersion project.minecraft_version
161162
addGameVersion "1.21.9"
162163
addGameVersion 'Fabric'

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### **\[Build 1.21.8-v2.15.0\]:**
2+
3+
- Fixed "broken implementation of ModMenuApi" crash ([thanks to litetex, #528](https://github.com/Aizistral-Studios/No-Chat-Reports/pull/528)).
4+
15
#### **\[Build 1.21.7-v2.14.0\]:**
26

37
- Initial 1.21.7 port ([thanks to sarunint, #524](https://github.com/Aizistral-Studios/No-Chat-Reports/pull/524));

forge/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ curseforge {
194194
changelogType = 'markdown'
195195
changelog = rootProject.file('docs/CHANGELOG.md')
196196

197+
addGameVersion "1.21.8"
197198
addGameVersion project.minecraft_version
198199
addGameVersion "1.21.6"
199200
addGameVersion "Java 21"
@@ -212,7 +213,7 @@ modrinth {
212213
versionType = "${version_type}"
213214
changelog = rootProject.file("docs/CHANGELOG.md").text
214215
uploadFile = jar
215-
gameVersions = [ project.minecraft_version, "1.21.6" ]
216+
gameVersions = [ "1.21.8", project.minecraft_version, "1.21.6" ]
216217

217218
syncBodyFrom = rootProject.file("docs/README.md").text
218219
}

neoforge/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ curseforge {
169169
changelogType = 'markdown'
170170
changelog = rootProject.file('docs/CHANGELOG.md')
171171

172+
addGameVersion "1.21.8"
172173
addGameVersion project.minecraft_version
173174
addGameVersion "1.21.6"
174175
addGameVersion "Java 21"
@@ -187,7 +188,7 @@ modrinth {
187188
versionType = "${version_type}"
188189
changelog = rootProject.file("docs/CHANGELOG.md").text
189190
uploadFile = jar
190-
gameVersions = [ project.minecraft_version, "1.21.6" ]
191+
gameVersions = [ "1.21.8", project.minecraft_version, "1.21.6" ]
191192

192193
syncBodyFrom = rootProject.file("docs/README.md").text
193194
}
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,25 @@
11
package com.aizistral.nochatreports.common.config;
22

3-
import java.util.Arrays;
4-
import java.util.List;
5-
import java.util.stream.Stream;
6-
73
import com.aizistral.nochatreports.common.NCRCore;
8-
import com.aizistral.nochatreports.common.core.ServerSafetyState;
9-
import com.aizistral.nochatreports.common.core.SigningMode;
10-
import com.aizistral.nochatreports.common.gui.FontHelper;
114
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
125
import com.terraformersmc.modmenu.api.ModMenuApi;
136

14-
import me.shedaniel.clothconfig2.api.ConfigBuilder;
15-
import me.shedaniel.clothconfig2.api.ConfigCategory;
16-
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
177
import net.fabricmc.api.EnvType;
188
import net.fabricmc.api.Environment;
19-
import net.minecraft.ChatFormatting;
20-
import net.minecraft.client.Minecraft;
21-
import net.minecraft.client.gui.screens.Screen;
22-
import net.minecraft.locale.Language;
23-
import net.minecraft.network.chat.ClickEvent;
24-
import net.minecraft.network.chat.Component;
25-
import net.minecraft.network.chat.HoverEvent;
269

2710
/**
2811
* Implementation of ModMenu and ClothConfig support for the mod.
29-
* @author MODKILLER1001
3012
*/
31-
3213
@Environment(EnvType.CLIENT)
3314
public final class ModMenuIntegration implements ModMenuApi {
3415

3516
@Override
3617
public ConfigScreenFactory<?> getModConfigScreenFactory() {
37-
if (!ClothConfigIntegration.ACTIVE) {
38-
NCRCore.LOGGER.warn("ClothConfig API not found, cannot provide config screen factory.");
39-
return null;
40-
} else
18+
if (ClothConfigIntegration.ACTIVE) {
4119
return ClothConfigIntegration::getConfigScreen;
42-
}
20+
}
4321

44-
}
22+
NCRCore.LOGGER.warn("ClothConfig API not found, cannot provide config screen factory.");
23+
return ModMenuApi.super.getModConfigScreenFactory();
24+
}
25+
}

0 commit comments

Comments
 (0)