aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Mills <85420839+Keebler408@users.noreply.github.com>2021-09-27 14:02:50 -0500
committerDavid Mills <85420839+Keebler408@users.noreply.github.com>2021-09-27 14:02:50 -0500
commit4da2b758d13b8ae443f1b2b84ec39e123c3b29f1 (patch)
treefd4a98db21c23a14f9e95a0014dddf388a12f16d /src
parent6a61e4e97006c8fe85581bea9d5f3fc0409ecfac (diff)
downloadNotEnoughUpdates-4da2b758d13b8ae443f1b2b84ec39e123c3b29f1.tar.gz
NotEnoughUpdates-4da2b758d13b8ae443f1b2b84ec39e123c3b29f1.tar.bz2
NotEnoughUpdates-4da2b758d13b8ae443f1b2b84ec39e123c3b29f1.zip
Use built-in getDisplayName method
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java2
2 files changed, 1 insertions, 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;