From b9fca3bf7df8c0c2046bbefeeb25896cc39eea7b Mon Sep 17 00:00:00 2001 From: Abdiel Kavash <19243993+AbdielKavash@users.noreply.github.com> Date: Sat, 9 Mar 2024 07:21:32 -0600 Subject: Syncing TextWidget (#34) * Replaces one instance where a dynamic text field is being communicated between server and client with a purely client-side method. In some cases this allows the client to do localization on these texts correctly. (See https://github.com/GTNewHorizons/ModularUI/pull/69.) This is a part of the series of PRs implementing new ModularUI features, however this mod does not use any numeric text fields or similar, and thus no other changes are needed. --- src/main/java/net/glease/ggfab/mte/MTE_AdvAssLine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/net/glease/ggfab/mte/MTE_AdvAssLine.java b/src/main/java/net/glease/ggfab/mte/MTE_AdvAssLine.java index e540bb4562..7bdba48995 100644 --- a/src/main/java/net/glease/ggfab/mte/MTE_AdvAssLine.java +++ b/src/main/java/net/glease/ggfab/mte/MTE_AdvAssLine.java @@ -540,7 +540,7 @@ public class MTE_AdvAssLine extends GT_MetaTileEntity_ExtendedPowerMultiBlockBas new TextWidget(Text.localised("ggfab.gui.advassline.shutdown")) .setEnabled(this::hasAbnormalStopReason)); screenElements.widget( - TextWidget.dynamicText(() -> Text.localised(lastStopReason)).setSynced(false) + new TextWidget().setTextSupplier(() -> Text.localised(lastStopReason)) .attachSyncer( new FakeSyncWidget.StringSyncer(() -> lastStopReason, r -> this.lastStopReason = r), screenElements) -- cgit