From 6bb74b36359686c29101c14ab00047682f2f72e7 Mon Sep 17 00:00:00 2001 From: micle Date: Sun, 18 Jan 2026 00:52:36 +0100 Subject: [PATCH] Updated totem tooltip to display N/A for cost when the target is also N/A. --- .../totem_of_reviving/item/totem/TotemItem.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/micle/totem_of_reviving/item/totem/TotemItem.java b/src/main/java/dev/micle/totem_of_reviving/item/totem/TotemItem.java index e53fe1d..614e41b 100644 --- a/src/main/java/dev/micle/totem_of_reviving/item/totem/TotemItem.java +++ b/src/main/java/dev/micle/totem_of_reviving/item/totem/TotemItem.java @@ -203,11 +203,13 @@ public abstract class TotemItem extends Item { ).withStyle(ChatFormatting.GRAY)); tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_TARGET_COST.getComponent( - Component.literal(String.format("%d", getTargetCost(totemData))).withStyle( - getTargetCost(totemData) <= getMaxCharge() - ? ChatFormatting.WHITE - : ChatFormatting.RED - ) + totemData.getTargetUUID().isPresent() + ? Component.literal(String.format("%d", getTargetCost(totemData))).withStyle( + getTargetCost(totemData) <= getMaxCharge() + ? ChatFormatting.WHITE + : ChatFormatting.RED + ) + : LangAsset.GENERAL_NA.getComponent().withStyle(ChatFormatting.RED) ).withStyle(ChatFormatting.GRAY)); tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_CHARGES.getComponent(