Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-09 01:30:13 +01:00
Merge pull request #1633 from KennyTV/abstraction
Put translation values into correct map
Dieser Commit ist enthalten in:
Commit
c9abd745c5
@ -77,14 +77,16 @@ public class MappingData {
|
|||||||
}
|
}
|
||||||
for (String line : lines) {
|
for (String line : lines) {
|
||||||
if (line.isEmpty()) continue;
|
if (line.isEmpty()) continue;
|
||||||
|
|
||||||
String[] keyAndTranslation = line.split("=", 2);
|
String[] keyAndTranslation = line.split("=", 2);
|
||||||
if (keyAndTranslation.length != 2) continue;
|
if (keyAndTranslation.length != 2) continue;
|
||||||
|
|
||||||
String key = keyAndTranslation[0];
|
String key = keyAndTranslation[0];
|
||||||
String translation = keyAndTranslation[1].replaceAll("%(\\d\\$)?d", "%$1s");
|
|
||||||
if (!translateData.containsKey(key)) {
|
if (!translateData.containsKey(key)) {
|
||||||
translateMapping.put(key, translation);
|
String translation = keyAndTranslation[1].replaceAll("%(\\d\\$)?d", "%$1s");
|
||||||
|
mojangTranslation.put(key, translation);
|
||||||
} else {
|
} else {
|
||||||
String dataValue = translateData.get(keyAndTranslation[0]);
|
String dataValue = translateData.get(key);
|
||||||
if (dataValue != null) {
|
if (dataValue != null) {
|
||||||
translateMapping.put(key, dataValue);
|
translateMapping.put(key, dataValue);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren