Using config for getting totem max durability for tooltip.
This commit is contained in:
@ -224,7 +224,7 @@ public abstract class TotemItem extends Item {
|
||||
isUnbreakable()
|
||||
? LangAsset.GENERAL_UNBREAKABLE.getComponent().withStyle(ChatFormatting.WHITE)
|
||||
: LangAsset.TOOLTIP_TOTEM_DURABILITY.getComponent(
|
||||
Component.literal(String.format("%d / %d", stack.getMaxDamage() - stack.getDamageValue(), stack.getMaxDamage())).withStyle(ChatFormatting.WHITE)
|
||||
Component.literal(String.format("%d / %d", getConfig().getDurability() - stack.getDamageValue(), getConfig().getDurability())).withStyle(ChatFormatting.WHITE)
|
||||
).withStyle(ChatFormatting.GRAY)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user