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:
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user