From 8c934fb8f258f61bea48fa98635722fd0066ecfe Mon Sep 17 00:00:00 2001 From: Zitrone30 Date: Sat, 28 Feb 2026 21:11:12 +0100 Subject: [PATCH] Respect sign translation fallbacks for Meteor key spoofing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AbstractSignEditScreenMixin was turning Meteor translation keys on signs into the raw key string every time. That broke vanilla behavior for signs that include a fallback, since vanilla returns the fallback when the key can’t be resolved. This keeps the existing key protection, but if the sign text is translatable and includes a fallback, it uses that fallback instead. If there isn’t one, it still uses the raw key. This makes Meteor behave like vanilla for fallback-based sign checks and fixes the detection issue. --- .gitignore | 2 ++ .../meteorclient/mixin/AbstractSignEditScreenMixin.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9502ead59a..4db31fba16 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ logs .idea/* !.idea/copyright/* !.idea/scopes/* +.vscode/* +.idea/* \ No newline at end of file diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/AbstractSignEditScreenMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/AbstractSignEditScreenMixin.java index 68cb072b41..4a2df73477 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/AbstractSignEditScreenMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/AbstractSignEditScreenMixin.java @@ -34,7 +34,10 @@ private Text modifyText(Text message) { if (message.getContent() instanceof TranslatableTextContent content) { String key = content.getKey(); - if (key.contains("meteor-client")) modified = MutableText.of(new PlainTextContent.Literal(key)); + if (key.contains("meteor-client")) { + String fallback = content.getFallback(); + modified = MutableText.of(new PlainTextContent.Literal(fallback != null ? fallback : key)); + } } modified.setStyle(message.getStyle());