Use INSTANCE instead of legacy() due to shading issues

Dieser Commit ist enthalten in:
MattBDev 2020-03-02 22:32:47 -05:00
Ursprung 9241e2d018
Commit dd4d405b36

Datei anzeigen

@ -40,7 +40,7 @@ public class Caption {
private static Component color(TextComponent text) { private static Component color(TextComponent text) {
String content = text.content(); String content = text.content();
if (content.indexOf('&') != -1) { if (content.indexOf('&') != -1) {
TextComponent legacy = LegacyComponentSerializer.legacy().deserialize(content, '&'); TextComponent legacy = LegacyComponentSerializer.INSTANCE.deserialize(content, '&');
legacy = (TextComponent) legacy.style(text.style()); legacy = (TextComponent) legacy.style(text.style());
if (!text.children().isEmpty()) { if (!text.children().isEmpty()) {
text = TextComponent.builder().append(legacy).append(text.children()).build(); text = TextComponent.builder().append(legacy).append(text.children()).build();