From c697563d4d8d596d65dbc91d82d7c0a9f10a25d4 Mon Sep 17 00:00:00 2001 From: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Date: Tue, 17 May 2022 18:02:09 +0200 Subject: Improve item editor (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> --- .../io/github/moulberry/notenoughupdates/NEUOverlay.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java') 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; -- cgit