aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.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/NEUOverlay.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/NEUOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index ff8187f2..fcdb9b9c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -80,6 +80,7 @@ import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
@@ -1135,8 +1136,9 @@ public class NEUOverlay extends Gui {
if (internalname.get() != null) {
if (itemstack.get() != null) {
if (NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing && Keyboard.getEventCharacter() == 'k') {
- Minecraft.getMinecraft().displayGuiScreen(new NEUItemEditor(manager,
- internalname.get(), manager.getJsonForItem(itemstack.get())
+ Minecraft.getMinecraft().displayGuiScreen(new NEUItemEditor(
+ internalname.get(),
+ manager.getJsonForItem(itemstack.get())
));
return true;
}
@@ -1159,9 +1161,7 @@ public class NEUOverlay extends Gui {
}
} else if (NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing &&
Keyboard.getEventCharacter() == 'k') {
- Minecraft.getMinecraft().displayGuiScreen(new NEUItemEditor(manager,
- internalname.get(), item
- ));
+ Minecraft.getMinecraft().displayGuiScreen(new NEUItemEditor(internalname.get(), item));
return true;
} else if (keyPressed == manager.keybindItemSelect.getKeyCode() &&
NotEnoughUpdates.INSTANCE.config.toolbar.searchBar) {
@@ -1880,7 +1880,7 @@ public class NEUOverlay extends Gui {
private String lastProfile;
private ItemStack getWardrobeSlot(int armourSlot) {
- if (!SBInfo.getInstance().currentProfile.equals(lastProfile)) {
+ if (!Objects.equals(SBInfo.getInstance().currentProfile, lastProfile)) {
lastProfile = SBInfo.getInstance().currentProfile;
slot1 = null;
slot2 = null;