1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Fix: Command block tags not translating name leniently

This commit is contained in:
onebeastchris
2025-08-21 02:51:29 +03:00
parent e68917b872
commit 8e295a978d
2 changed files with 1 additions and 12 deletions

View File

@@ -45,7 +45,7 @@ public class CommandBlockBlockEntityTranslator extends BlockEntityTranslator imp
// Java and Bedrock values
bedrockNbt.putByte("conditionMet", javaNbt.getByte("conditionMet"));
bedrockNbt.putByte("auto", javaNbt.getByte("auto"));
bedrockNbt.putString("CustomName", MessageTranslator.convertJsonMessage(javaNbt.getString("CustomName"), session.locale()));
bedrockNbt.putString("CustomName", MessageTranslator.convertMessageLenient(javaNbt.getString("CustomName"), session.locale()));
bedrockNbt.putByte("powered", javaNbt.getByte("powered"));
bedrockNbt.putString("Command", javaNbt.getString("Command"));
bedrockNbt.putInt("SuccessCount", javaNbt.getInt("SuccessCount"));

View File

@@ -289,17 +289,6 @@ public class MessageTranslator {
return convertMessageLenient(message, GeyserLocale.getDefaultLocale());
}
/**
* Convert a Bedrock message string back to a format Java can understand
*
* @param message Message to convert
* @return The formatted JSON string
*/
public static String convertToJavaMessage(String message) {
Component component = BEDROCK_SERIALIZER.deserialize(message);
return GSON_SERIALIZER.serialize(component);
}
/**
* Convert a Java message to plain text
*