Added max damage display to the advanced tooltip

This commit is contained in:
Ellpeck 2016-05-07 23:38:50 +02:00
parent 19d11e783b
commit 1f6f3152ed

View file

@ -63,8 +63,9 @@ public class TooltipEvent{
//Metadata
int meta = event.getItemStack().getItemDamage();
int max = event.getItemStack().getMaxDamage();
event.getToolTip().add(ADVANCED_INFO_HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".meta.desc")+":");
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+meta);
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+meta+(max > 0 ? "/"+max : ""));
//Unlocalized Name
String metaName = event.getItemStack().getItem().getUnlocalizedName(event.getItemStack());