From 0d3a689f178678f00825c3be7065882230cab7b5 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Thu, 16 Apr 2020 14:48:23 +0200 Subject: [PATCH] [1.14+] Fix "Player Overview" title We used to remap the old language key layout for inputs to the one used by fabric but didn't consider that we might still be directly referencing the old key somewhere else (e.g. for the Player Overview title). With this commit, we retain the original and add the new mapping. --- .../java/com/replaymod/core/versions/LangResourcePack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/replaymod/core/versions/LangResourcePack.java b/src/main/java/com/replaymod/core/versions/LangResourcePack.java index b8992829..74627b38 100644 --- a/src/main/java/com/replaymod/core/versions/LangResourcePack.java +++ b/src/main/java/com/replaymod/core/versions/LangResourcePack.java @@ -37,7 +37,7 @@ import java.util.stream.Collectors; /** * Resource pack which on-the-fly converts pre-1.13 language files into 1.13 json format. - * Also remaps `replaymod.input.*` bindings to `key.replaymod.*` as convention on Fabric. + * Also duplicates `replaymod.input.*` bindings to `key.replaymod.*` as convention on Fabric. */ public class LangResourcePack extends AbstractFileResourcePack { private static final Gson GSON = new Gson(); @@ -120,6 +120,8 @@ public class LangResourcePack extends AbstractFileResourcePack { value = convertValue(value); //#if MC>=11400 if (key.startsWith(LEGACY_KEY_PREFIX)) { + // Duplicating instead of just remapping as some other part of the UI may still rely on the old key + properties.put(key, value); key = String.format(FABRIC_KEY_FORMAT, key.substring(LEGACY_KEY_PREFIX.length())); } //#endif