diff options
Diffstat (limited to 'src/main/java/com/aizistral')
3 files changed, 3 insertions, 35 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 302f6ae..6fe7556 100644 --- a/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java +++ b/src/main/java/com/aizistral/nochatreports/common/config/ClothConfigIntegration.java @@ -129,13 +129,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 7856669..302b824 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, @@ -121,17 +121,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 3978da2..a4105d8 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 @@ -1,6 +1,5 @@ package com.aizistral.nochatreports.common.mixins.client; -import net.minecraft.client.gui.components.ImageButton; import net.minecraft.client.gui.components.Tooltip; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; import net.minecraft.client.gui.layouts.LinearLayout; @@ -19,12 +18,11 @@ import com.aizistral.nochatreports.common.gui.GUIShenanigans; 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.Identifier; /** - * 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 */ @@ -32,9 +30,7 @@ import net.minecraft.resources.Identifier; public abstract class MixinJoinMultiplayerScreen extends Screen { @Shadow @Final private HeaderAndFooterLayout layout; - private static final Identifier RELOAD_TEXTURE = Identifier.fromNamespaceAndPath("nochatreports", "textures/gui/config_reload_button.png"), - TOGGLE_TEXTURE = Identifier.fromNamespaceAndPath("nochatreports", "textures/gui/ncr_toggle_button.png"); - private static final Component RELOAD_TOOLTIP = Component.translatable("gui.nochatreports.reload_config_tooltip"); + private static final Identifier TOGGLE_TEXTURE = Identifier.fromNamespaceAndPath("nochatreports", "textures/gui/ncr_toggle_button.png"); protected MixinJoinMultiplayerScreen() { super(null); @@ -47,16 +43,6 @@ public abstract class MixinJoinMultiplayerScreen extends Screen { layoutSettings.paddingLeft(336); }); - if (NCRConfig.getClient().showReloadButton()) { - var button = new ImageButton(0, 0, 20, 20, - GUIShenanigans.getSprites("config_reload_button"), - btn -> NCRConfig.load(), CommonComponents.EMPTY); - button.setTooltip(Tooltip.create(RELOAD_TOOLTIP)); - button.active = true; - button.visible = true; - ncrButtons.addChild(button); - } - if (NCRConfig.getClient().showNCRButton()) { var button = CycleButton.onOffBuilder(NCRConfig.getClient().enableMod()) .withSprite((btn, value) -> { |
