From 25438bdfb9c1d56e06eb09d9b62dd98f20b11bf3 Mon Sep 17 00:00:00 2001
From: Aizistral
Date: Thu, 19 Nov 2026 00:19:12 +0100
Subject: Remove config reload button
---
.../common/config/ClothConfigIntegration.java | 7 -------
.../nochatreports/common/config/NCRConfigClient.java | 13 +------------
.../mixins/client/MixinJoinMultiplayerScreen.java | 17 ++---------------
3 files changed, 3 insertions(+), 34 deletions(-)
(limited to 'src/main/java/com')
diff --git a/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java b/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java
index d65d191..5f23c88 100644
--- a/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java
+++ b/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java
@@ -128,13 +128,6 @@ public final class ClothConfigIntegration {
.build()
);
- // Set an option for showReloadButton
- client.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.showReloadButton"), NCRConfig.getClient().showReloadButton)
- .setDefaultValue(true)
- .setTooltip(makeTooltip("option.NoChatReports.showReloadButton.tooltip"))
- .setSaveConsumer(newValue -> NCRConfig.getClient().showReloadButton = newValue)
- .build());
-
// Set an option for verifiedIconEnabled
client.addEntry(entryBuilder.startBooleanToggle(Component.translatable("option.NoChatReports.verifiedIconEnabled"), NCRConfig.getClient().verifiedIconEnabled)
.setDefaultValue(true)
diff --git a/src/main/java/com/aizistral/nochatreports/common/config/NCRConfigClient.java b/src/main/java/com/aizistral/nochatreports/common/config/NCRConfigClient.java
index 30db481..7363581 100644
--- a/src/main/java/com/aizistral/nochatreports/common/config/NCRConfigClient.java
+++ b/src/main/java/com/aizistral/nochatreports/common/config/NCRConfigClient.java
@@ -9,7 +9,7 @@ public final class NCRConfigClient extends JSONConfig {
protected static final String FILE_NAME = "NoChatReports/NCR-Client.json";
protected SigningMode defaultSigningMode = SigningMode.PROMPT;
- protected boolean enableMod = true, showNCRButton = true, showReloadButton = true,
+ protected boolean enableMod = true, showNCRButton = true,
verifiedIconEnabled = true, showServerSafety = true, hideInsecureMessageIndicators = true,
hideModifiedMessageIndicators = true, hideSystemMessageIndicators = true,
hideWarningToast = true, hideSigningRequestMessage = false, alwaysHideReportButton = false,
@@ -124,17 +124,6 @@ public final class NCRConfigClient extends JSONConfig {
return this.disableTelemetry;
}
- /**
- * @return True if the configuration reload button should be displayed in multiplayer screen.
- *
- *
- * This is true by default.
- */
-
- public boolean showReloadButton() {
- return this.showReloadButton;
- }
-
/**
* @return True if "Safe Server" icon should be displayed in multiplayer menu for servers that
* declare themselves as preventing chat reports.
diff --git a/src/main/java/com/aizistral/nochatreports/common/mixins/client/MixinJoinMultiplayerScreen.java b/src/main/java/com/aizistral/nochatreports/common/mixins/client/MixinJoinMultiplayerScreen.java
index 195d331..c3c0d33 100644
--- a/src/main/java/com/aizistral/nochatreports/common/mixins/client/MixinJoinMultiplayerScreen.java
+++ b/src/main/java/com/aizistral/nochatreports/common/mixins/client/MixinJoinMultiplayerScreen.java
@@ -16,20 +16,17 @@ import net.minecraft.client.gui.components.ImageButton;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.multiplayer.JoinMultiplayerScreen;
import net.minecraft.locale.Language;
-import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
/**
- * This is responsible for adding config reload button to server selection menu.
+ * This is responsible for adding mod toggle button to server selection menu.
* @author Aizistral
*/
@Mixin(JoinMultiplayerScreen.class)
public abstract class MixinJoinMultiplayerScreen extends Screen {
- private static final ResourceLocation RELOAD_TEXTURE = new ResourceLocation("nochatreports", "textures/gui/config_reload_button.png"),
- TOGGLE_TEXTURE = new ResourceLocation("nochatreports", "textures/gui/ncr_toggle_button.png");
- private static final Component RELOAD_TOOLTIP = Component.translatable("gui.nochatreports.reload_config_tooltip");
+ private static final ResourceLocation TOGGLE_TEXTURE = new ResourceLocation("nochatreports", "textures/gui/ncr_toggle_button.png");
protected MixinJoinMultiplayerScreen() {
super(null);
@@ -38,16 +35,6 @@ public abstract class MixinJoinMultiplayerScreen extends Screen {
@Inject(method = "init", at = @At("HEAD"))
private void onInit(CallbackInfo info) {
- if (NCRConfig.getClient().showReloadButton()) {
- var button = new AdvancedImageButton(this.width/2 + 158, this.height - 54, 20, 20,
- SwitchableSprites.of(GUIShenanigans.getSprites("config_reload_button")),
- btn -> NCRConfig.load(), CommonComponents.EMPTY, this);
- button.setTooltip(new AdvancedTooltip(RELOAD_TOOLTIP).setMaxWidth(250));
- button.active = true;
- button.visible = true;
- this.addRenderableWidget(button);
- }
-
if (NCRConfig.getClient().showNCRButton()) {
var button = new AdvancedImageButton(this.width/2 + 158, this.height - 30, 20, 20,
SwitchableSprites.of(
--
cgit v1.2.3