Implemented NBT Saving

1.13: CustomItemTagContainer
1.14: PersistentDataContainer
This commit is contained in:
Sn0wStorm
2019-10-20 21:06:35 +02:00
parent f431c13100
commit 4909e59c90
11 changed files with 222 additions and 29 deletions
+12
View File
@@ -189,12 +189,24 @@ public class BrewLore {
}
public void removeLegacySpacing() {
if (P.useNBT) {
// Using NBT we don't get the invisible line, so we keep our spacing
return;
}
if (lore.size() > 0 && lore.get(0).equals("")) {
lore.remove(0);
write();
}
}
public void removeLoreData() {
int index = BUtil.indexOfStart(lore, LoreSaveStream.IDENTIFIER);
if (index != -1) {
lore.set(index, "");
write();
}
}
// True if the PotionMeta has Lore in quality color
public static boolean hasColorLore(PotionMeta meta) {
if (!meta.hasLore()) return false;