From 11bb1349e9904572fef8b783c36760a3c003df81 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Mon, 10 Aug 2020 18:03:46 +0200 Subject: [PATCH] Compare to correct tag in lore processing --- .../viabackwards/api/rewriters/ItemRewriter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriter.java b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriter.java index 6a880f25..6e4eb028 100644 --- a/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriter.java +++ b/core/src/main/java/nl/matsv/viabackwards/api/rewriters/ItemRewriter.java @@ -52,17 +52,17 @@ public abstract class ItemRewriter 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) {