diff options
| author | Aizistral | 2026-11-19 00:19:12 +0100 |
|---|---|---|
| committer | Aizistral | 2026-11-19 00:19:12 +0100 |
| commit | 25438bdfb9c1d56e06eb09d9b62dd98f20b11bf3 (patch) | |
| tree | e10503ade15f3a0c6687e838f26e4d05db1af143 /src/main/java/com | |
| parent | 64b15ffd4ceec9004e86a2ca724ea7420ae102c3 (diff) | |
Remove config reload button
Diffstat (limited to 'src/main/java/com')
3 files changed, 3 insertions, 34 deletions
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, @@ -125,17 +125,6 @@ public final class NCRConfigClient extends JSONConfig { } /** - * @return True if the configuration reload button should be displayed in multiplayer screen. - * <br><br> - * - * 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.<br><br> * 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( |
