From 8187c774f21b3ddc6927c0ebfa3e689c7bcdc3ab Mon Sep 17 00:00:00 2001 From: Worive <13164341+Worive@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:14:22 +0100 Subject: [PATCH] Display custom name in MemoryCard tooltip (#614) Co-authored-by: Martin Robertz --- src/main/java/appeng/items/tools/ToolMemoryCard.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/appeng/items/tools/ToolMemoryCard.java b/src/main/java/appeng/items/tools/ToolMemoryCard.java index fab7d123f58..5fbd68962ab 100644 --- a/src/main/java/appeng/items/tools/ToolMemoryCard.java +++ b/src/main/java/appeng/items/tools/ToolMemoryCard.java @@ -56,7 +56,12 @@ public void addCheckedInformation(final ItemStack stack, final EntityPlayer play lines.add(String.format(local, freqTooltip)); } - if (data.hasKey("custom_name")) lines.add(data.getString("custom_name")); + + if (data.hasKey("custom_name")) { + lines.add(data.getString("custom_name")); + } else if (data.hasKey("display") && data.getCompoundTag("display").hasKey("Name")) { + lines.add(data.getCompoundTag("display").getString("Name")); + } } /**