From f79c72a277b9c9621e1ffb24bc27829fb2806682 Mon Sep 17 00:00:00 2001 From: Lyfts <127234178+Lyfts@users.noreply.github.com> Date: Sun, 27 Oct 2024 11:20:11 +0100 Subject: [PATCH] fix some icons not being found --- .../lunatrius/ingameinfo/value/ValueComplex.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/github/lunatrius/ingameinfo/value/ValueComplex.java b/src/main/java/com/github/lunatrius/ingameinfo/value/ValueComplex.java index ba7c1f7..f38287d 100644 --- a/src/main/java/com/github/lunatrius/ingameinfo/value/ValueComplex.java +++ b/src/main/java/com/github/lunatrius/ingameinfo/value/ValueComplex.java @@ -268,7 +268,7 @@ public String getValue() { return ""; } - if (size == 1 || size == 2) { + if ((size == 1 || size == 2) && !what.endsWith(".png")) { int metadata = 0; if (size == 2) { metadata = getIntValue(1); @@ -288,9 +288,7 @@ public String getValue() { InfoItem item = new InfoItem(itemStack); item.setIdentifier(what); - if (parent != null) { - parent.attachValue(getName(), item); - } + parent.attachValue(getName(), item); return Tag.getIconTag(item); } @@ -316,9 +314,7 @@ public String getValue() { icon.setTextureData(iconX, iconY, iconWidth, iconHeight, textureWidth, textureHeight); } - if (parent != null) { - parent.attachValue(getName(), icon); - } + parent.attachValue(getName(), icon); return Tag.getIconTag(icon); } catch (Exception e) { return "?";