Skip to content

Commit bd773d4

Browse files
committed
fix color codes in sign preview
1 parent 99c1ff6 commit bd773d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
+
4949
+ final Component[] lines = front ? frontText.getMessages(filtered) : backText.getMessages(filtered);
5050
+ final String side = front ? "front_text" : "back_text";
51+
+ net.minecraft.world.level.storage.ValueOutput sideNbt = tagValueOutput.child(side);
52+
+ net.minecraft.world.level.storage.ValueOutput.TypedOutputList<String> messagesNbt = sideNbt.list("messages", com.mojang.serialization.Codec.STRING);
5153
+ for (int i = 0; i < 4; i++) {
5254
+ final net.kyori.adventure.text.Component component = io.papermc.paper.adventure.PaperAdventure.asAdventure(lines[i]);
5355
+ final String line = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().serialize(component);
54-
+ net.minecraft.world.level.storage.ValueOutput sideNbt = tagValueOutput.child(side);
55-
+ net.minecraft.world.level.storage.ValueOutput.TypedOutputList<String> messagesNbt = sideNbt.list("messages", com.mojang.serialization.Codec.STRING);
5656
+ messagesNbt.add(line);
5757
+ }
5858
+ tagValueOutput.putString("PurpurEditor", "true");

0 commit comments

Comments
 (0)