aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
diff options
context:
space:
mode:
authorLulonaut <67191924+Lulonaut@users.noreply.github.com>2022-05-17 18:02:09 +0200
committerGitHub <noreply@github.com>2022-05-17 18:02:09 +0200
commitc697563d4d8d596d65dbc91d82d7c0a9f10a25d4 (patch)
tree9e91a883b464817c74d1a5634e3de8ff9c2fa574 /src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
parent1076a433bb6bb57c4d9ab73342d8f8b21c9749fc (diff)
downloadnotenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.tar.gz
notenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.tar.bz2
notenoughupdates-c697563d4d8d596d65dbc91d82d7c0a9f10a25d4.zip
Improve item editor (#137)
* Intellij insurance * Only parse inventory in essence guide * Save mobs with whitespaces correctly * npe when currentProfile is null * ??? * 🧌 * 🤡 * Fixed crash with spamming remove enchant in /neuec - thank you lulo for free pr to commit to * added command to toggle repo autoupdating * i am so good at patch note * i used the github web editor for this * i double checked the brackets and everything * don't even look at it (this is only ran with dev mode enabled) * more readable Co-authored-by: NopoTheGamer <noahogno@gmail.com> Co-authored-by: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
index 4e865b28..5a8fd901 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java
@@ -599,10 +599,12 @@ public class GuiEnchantColour extends GuiScreen {
getEnchantOpString(guiElementTextFields.get(yIndex), comparators.get(yIndex), modifiers.get(yIndex))
);
} else if (mouseX > guiLeft + 160 && mouseX < guiLeft + 160 + 20) {
- NotEnoughUpdates.INSTANCE.config.hidden.enchantColours.remove(yIndex);
- guiElementTextFields.remove(yIndex);
- comparators.remove(yIndex);
- modifiers.remove(yIndex);
+ if (NotEnoughUpdates.INSTANCE.config.hidden.enchantColours.size() > 0) {
+ NotEnoughUpdates.INSTANCE.config.hidden.enchantColours.remove(yIndex);
+ guiElementTextFields.remove(yIndex);
+ comparators.remove(yIndex);
+ modifiers.remove(yIndex);
+ }
}
}
}