Skip to content

Commit

Permalink
Make the dyed armor texture supplier always render ignore the modifie…
Browse files Browse the repository at this point in the history
…r being absent

more accurate method than checking the color default
  • Loading branch information
KnightMiner committed May 15, 2024
1 parent 02e6cf2 commit f3f83e3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ public DyedArmorTextureSupplier(ResourceLocation base, String variant, ModifierI

@Override
public ArmorTexture getArmorTexture(ItemStack stack, TextureType textureType) {
if (ModifierUtil.getModifierLevel(stack, modifier) > 0) {
if (alwaysRender || ModifierUtil.getModifierLevel(stack, modifier) > 0) {
int color = ModifierUtil.getPersistentInt(stack, modifier, -1);
if (alwaysRender || color != -1) {
return new ArmorTexture(textures[textureType.ordinal()], 0xFF000000 | color);
}
return new ArmorTexture(textures[textureType.ordinal()], 0xFF000000 | color);
}
return ArmorTexture.EMPTY;
}
Expand Down

0 comments on commit f3f83e3

Please sign in to comment.