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));
|
).withStyle(ChatFormatting.GRAY));
|
||||||
|
|
||||||
tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_TARGET_COST.getComponent(
|
tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_TARGET_COST.getComponent(
|
||||||
Component.literal(String.format("%d", getTargetCost(totemData))).withStyle(
|
totemData.getTargetUUID().isPresent()
|
||||||
getTargetCost(totemData) <= getMaxCharge()
|
? Component.literal(String.format("%d", getTargetCost(totemData))).withStyle(
|
||||||
? ChatFormatting.WHITE
|
getTargetCost(totemData) <= getMaxCharge()
|
||||||
: ChatFormatting.RED
|
? ChatFormatting.WHITE
|
||||||
)
|
: ChatFormatting.RED
|
||||||
|
)
|
||||||
|
: LangAsset.GENERAL_NA.getComponent().withStyle(ChatFormatting.RED)
|
||||||
).withStyle(ChatFormatting.GRAY));
|
).withStyle(ChatFormatting.GRAY));
|
||||||
|
|
||||||
tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_CHARGES.getComponent(
|
tooltipComponents.add(LangAsset.TOOLTIP_TOTEM_CHARGES.getComponent(
|
||||||
|
|||||||
Reference in New Issue
Block a user