Skip to content

Commit

Permalink
fix some icons not being found
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts committed Oct 27, 2024
1 parent cc6b62e commit f79c72a
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

Expand All @@ -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 "?";
Expand Down

0 comments on commit f79c72a

Please sign in to comment.