items stats: add option to show weight

This commit is contained in:
Dava
2019-06-18 05:36:52 +01:00
committed by Adam
parent d777183ae8
commit 42d76a3636
2 changed files with 14 additions and 1 deletions

View File

@@ -92,6 +92,16 @@ public interface ItemStatConfig extends Config
return false;
}
@ConfigItem(
keyName = "showWeight",
name = "Show Weight",
description = "Show weight in tooltip"
)
default boolean showWeight()
{
return true;
}
@ConfigItem(
keyName = "colorBetterUncapped",
name = "Better (Uncapped)",

View File

@@ -189,7 +189,10 @@ public class ItemStatOverlay extends Overlay
private String buildStatBonusString(ItemStats s)
{
final StringBuilder b = new StringBuilder();
b.append(getChangeString("Weight", s.getWeight(), true, false));
if (config.showWeight())
{
b.append(getChangeString("Weight", s.getWeight(), true, false));
}
ItemStats other = null;
final ItemEquipmentStats currentEquipment = s.getEquipment();