3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-09-07 13:22:54 +02:00

Compare to correct tag in lore processing

Dieser Commit ist enthalten in:
KennyTV 2020-08-10 18:03:46 +02:00
Ursprung 6289e9317d
Commit 11bb1349e9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -52,17 +52,17 @@ public abstract class ItemRewriter<T extends BackwardsProtocol> extends ItemRewr
if (lore != null) { if (lore != null) {
ListTag original = null; ListTag original = null;
boolean changed = false; boolean changed = false;
for (Tag loreEntry : lore) { for (Tag loreEntryTag : lore) {
if (!(loreEntry instanceof StringTag)) continue; if (!(loreEntryTag instanceof StringTag)) continue;
StringTag stringTag = (StringTag) loreEntry; StringTag loreEntry = (StringTag) loreEntryTag;
String newValue = translatableRewriter.processText(stringTag.getValue()).toString(); String newValue = translatableRewriter.processText(loreEntry.getValue()).toString();
if (!changed && !newValue.equals(name.getValue())) { if (!changed && !newValue.equals(loreEntry.getValue())) {
changed = true; changed = true;
original = lore.clone(); original = lore.clone();
} }
stringTag.setValue(newValue); loreEntry.setValue(newValue);
} }
if (changed) { if (changed) {