aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
diff options
context:
space:
mode:
authorVixid <52578495+Vixid1@users.noreply.github.com>2022-10-19 11:25:53 +0100
committerGitHub <noreply@github.com>2022-10-19 12:25:53 +0200
commit04f8a44c150ab46997bbde53b8a4cf65aaa39327 (patch)
treef85ddd21369b54347cd1cb8675f5d4e0f14e1eba /src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
parentb967e1be50e31decfea30e08b4bf074eaed36e98 (diff)
downloadnotenoughupdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.tar.gz
notenoughupdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.tar.bz2
notenoughupdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.zip
Couple minor bug fixes (#377)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
index 8b81d1b4..6187495c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
@@ -250,6 +250,7 @@ public class ItemUtils {
for (int i = 0; i < newLore.size(); i++) {
String cleaned = Utils.cleanColour(newLore.get(i));
if (cleaned.equals("Right-click to add this pet to")) {
+ if (heldItem == null) newLore.remove(i + 2);
newLore.remove(i + 1);
newLore.remove(i);
secondLastBlankLine = i - 1;
@@ -277,6 +278,7 @@ public class ItemUtils {
petItemLore.add("");
}
petItemLore.add("§a(" + currentPet.candyUsed + "/10) Pet Candy Used");
+ if (heldItem == null) petItemLore.add("");
}
newLore.addAll(secondLastBlankLine + 1, petItemLore);
}