mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
Added max damage display to the advanced tooltip
This commit is contained in:
parent
19d11e783b
commit
1f6f3152ed
1 changed files with 2 additions and 1 deletions
|
@ -63,8 +63,9 @@ public class TooltipEvent{
|
||||||
|
|
||||||
//Metadata
|
//Metadata
|
||||||
int meta = event.getItemStack().getItemDamage();
|
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_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
|
//Unlocalized Name
|
||||||
String metaName = event.getItemStack().getItem().getUnlocalizedName(event.getItemStack());
|
String metaName = event.getItemStack().getItem().getUnlocalizedName(event.getItemStack());
|
||||||
|
|
Loading…
Reference in a new issue