mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-10-06 05:57:56 +02:00
Compare to correct tag in lore processing
This commit is contained in:
parent
6289e9317d
commit
11bb1349e9
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user