Fix Lore order when converting & 1.8 Regeneration

This commit is contained in:
Sn0wStorm
2019-12-13 11:43:37 +01:00
parent 214bb52939
commit 9afeae7774
8 changed files with 16 additions and 35 deletions
+7 -5
View File
@@ -304,15 +304,17 @@ public class BrewLore {
*/
public int addOrReplaceLore(Type type, String prefix, String line) {
int index = type.findInLore(lore);
if (index == -1) {
index = BUtil.indexOfSubstring(lore, line);
}
if (index > -1) {
lore.set(index, type.id + prefix + line);
return index;
} else {
return addLore(type, prefix, line);
}
// Could not find Lore by type, find and replace by substring
index = BUtil.indexOfSubstring(lore, line);
if (index > -1) {
lore.remove(index);
}
return addLore(type, prefix, line);
}
/**