3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-26 00:48:03 +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) {
ListTag original = null;
boolean changed = false;
for (Tag loreEntry : lore) {
if (!(loreEntry instanceof StringTag)) continue;
for (Tag loreEntryTag : lore) {
if (!(loreEntryTag instanceof StringTag)) continue;
StringTag stringTag = (StringTag) loreEntry;
String newValue = translatableRewriter.processText(stringTag.getValue()).toString();
if (!changed && !newValue.equals(name.getValue())) {
StringTag loreEntry = (StringTag) loreEntryTag;
String newValue = translatableRewriter.processText(loreEntry.getValue()).toString();
if (!changed && !newValue.equals(loreEntry.getValue())) {
changed = true;
original = lore.clone();
}
stringTag.setValue(newValue);
loreEntry.setValue(newValue);
}
if (changed) {