3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Switch to client's translation for jukebox song name. (#573)

Just for consistency with the other part of the code.
Dieser Commit ist enthalten in:
Camotoy 2020-05-17 00:57:34 -04:00 committet von GitHub
Ursprung 3220532083
Commit 563cde2ade
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -140,8 +140,7 @@ public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectP
textPacket.setSourceName(null); textPacket.setSourceName(null);
textPacket.setMessage("record.nowPlaying"); textPacket.setMessage("record.nowPlaying");
List<String> params = new ArrayList<>(); List<String> params = new ArrayList<>();
// Couldn't figure out how to set this to Bedrock translation so it just uses the Java translation String recordString = "%item." + EffectUtils.RECORDS.get(recordEffectData.getRecordId()).name().toLowerCase() + ".desc";
String recordString = "item.minecraft." + EffectUtils.RECORDS.get(recordEffectData.getRecordId()).name().toLowerCase().replace("record_", "music_disc_") + ".desc";
params.add(LocaleUtils.getLocaleString(recordString, session.getClientData().getLanguageCode())); params.add(LocaleUtils.getLocaleString(recordString, session.getClientData().getLanguageCode()));
textPacket.setParameters(params); textPacket.setParameters(params);
session.sendUpstreamPacket(textPacket); session.sendUpstreamPacket(textPacket);