From 4da2b758d13b8ae443f1b2b84ec39e123c3b29f1 Mon Sep 17 00:00:00 2001 From: David Mills <85420839+Keebler408@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:02:50 -0500 Subject: Use built-in getDisplayName method --- src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 5 ----- .../io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 40ae9899..5fef4c62 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -723,11 +723,6 @@ public class NEUManager { return lore; } - public String getNameFromNBT(NBTTagCompound tag) { - NBTTagCompound display = tag.getCompoundTag("display"); - return display.getString("Name"); - } - public JsonObject getJsonFromNBT(NBTTagCompound tag) { return getJsonFromNBTEntry(tag.getTagList("i", 10).getCompoundTagAt(0)); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java index 889647a8..0943f120 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -128,7 +128,7 @@ public class MiningOverlay extends TextOverlay { return; } - String name = Utils.cleanColour(NotEnoughUpdates.INSTANCE.manager.getNameFromNBT((commTypeStack.getTagCompound()))).trim(); + String name = Utils.cleanColour(commTypeStack.getDisplayName()).trim(); if (!name.equals("Switch Type")) { return; -- cgit