Updated totem tooltip to display N/A for cost when the target is also N/A.
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user