Using config for getting totem max durability for tooltip.

This commit is contained in:
2026-01-18 02:36:43 +01:00
parent ed3dcc3d1e
commit c21ba74432

View File

@ -224,7 +224,7 @@ public abstract class TotemItem extends Item {
isUnbreakable() isUnbreakable()
? LangAsset.GENERAL_UNBREAKABLE.getComponent().withStyle(ChatFormatting.WHITE) ? LangAsset.GENERAL_UNBREAKABLE.getComponent().withStyle(ChatFormatting.WHITE)
: LangAsset.TOOLTIP_TOTEM_DURABILITY.getComponent( : 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) ).withStyle(ChatFormatting.GRAY)
); );