From 5d1b8dbb853f6d7ae558b24dc74f70aeacdf5fd5 Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Thu, 16 Jan 2020 10:39:31 +0100 Subject: [PATCH] Put translation values into correct map --- .../protocols/protocol1_13to1_12_2/data/MappingData.java | 8 +++++--- .../protocol1_13to1_12_2/data/StatisticMappings.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java index b949e9982..6af26aafb 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java @@ -77,14 +77,16 @@ public class MappingData { } for (String line : lines) { if (line.isEmpty()) continue; + String[] keyAndTranslation = line.split("=", 2); if (keyAndTranslation.length != 2) continue; + String key = keyAndTranslation[0]; - String translation = keyAndTranslation[1].replaceAll("%(\\d\\$)?d", "%$1s"); if (!translateData.containsKey(key)) { - translateMapping.put(key, translation); + String translation = keyAndTranslation[1].replaceAll("%(\\d\\$)?d", "%$1s"); + mojangTranslation.put(key, translation); } else { - String dataValue = translateData.get(keyAndTranslation[0]); + String dataValue = translateData.get(key); if (dataValue != null) { translateMapping.put(key, dataValue); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/StatisticMappings.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/StatisticMappings.java index 3118be2df..60d977249 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/StatisticMappings.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/StatisticMappings.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.Map; public class StatisticMappings { - + public static final Map statistics = new HashMap<>(); static {