3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 14:30:17 +01:00

[Android] Remove usage of MCProtocolLib Base64 in SkinUtils + more (#1237)

* Remove usage of MCProtocolLib Base64 in SkinUtils

* Fix path resolution for downloading locales
Dieser Commit ist enthalten in:
rtm516 2020-09-16 16:33:59 +01:00 committet von GitHub
Ursprung 3c1d4aae93
Commit 1a49e882d3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -133,7 +133,7 @@ public class LocaleUtils {
* @param locale Locale to download * @param locale Locale to download
*/ */
private static void downloadLocale(String locale) { private static void downloadLocale(String locale) {
File localeFile = Paths.get(GeyserConnector.getInstance().getBootstrap().getConfigFolder().toString(),"locales",locale + ".json").toFile(); File localeFile = GeyserConnector.getInstance().getBootstrap().getConfigFolder().resolve("locales/" + locale + ".json").toFile();
// Check if we have already downloaded the locale file // Check if we have already downloaded the locale file
if (localeFile.exists()) { if (localeFile.exists()) {

Datei anzeigen

@ -270,7 +270,7 @@ public class SkinUtils {
GeyserConnector.getInstance().getLogger().info(LanguageUtils.getLocaleStringLog("geyser.skin.bedrock.register", playerEntity.getUsername(), playerEntity.getUuid())); GeyserConnector.getInstance().getLogger().info(LanguageUtils.getLocaleStringLog("geyser.skin.bedrock.register", playerEntity.getUsername(), playerEntity.getUuid()));
try { try {
byte[] skinBytes = com.github.steveice10.mc.auth.util.Base64.decode(clientData.getSkinData().getBytes("UTF-8")); byte[] skinBytes = Base64.getDecoder().decode(clientData.getSkinData().getBytes("UTF-8"));
byte[] capeBytes = clientData.getCapeData(); byte[] capeBytes = clientData.getCapeData();
byte[] geometryNameBytes = Base64.getDecoder().decode(clientData.getGeometryName().getBytes("UTF-8")); byte[] geometryNameBytes = Base64.getDecoder().decode(clientData.getGeometryName().getBytes("UTF-8"));