From 032ce5f651d384aff73c29c9438f5e80c09c3dd5 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 21 Oct 2018 15:31:17 +0200 Subject: [PATCH] Pass through the original type to mods (reported by Poly) --- .../model/armour/DefaultPonyArmorTextureResolver.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java b/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java index 0355f41f..7e75c1fc 100644 --- a/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java +++ b/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java @@ -8,6 +8,7 @@ import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; +import com.google.common.base.Strings; import com.google.common.collect.Maps; import com.minelittlepony.ForgeProxy; import com.minelittlepony.model.armour.IEquestrianArmor.ArmorLayer; @@ -35,10 +36,10 @@ public class DefaultPonyArmorTextureResolver impleme texture = texture.substring(idx + 1); } - type = type == null ? "" : String.format("_%s", type); + String customType = type == null ? "" : String.format("_%s", type); - String ponyRes = String.format("%s:textures/models/armor/%s_layer_%s%s.png", domain, texture, layer.name().toLowerCase(), type); - String oldPonyRes = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, layer == ArmorLayer.INNER ? 2 : 1, type); + String ponyRes = String.format("%s:textures/models/armor/%s_layer_%s%s.png", domain, texture, layer.name().toLowerCase(), customType); + String oldPonyRes = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, layer == ArmorLayer.INNER ? 2 : 1, customType); ResourceLocation human = getArmorTexture(entity, itemstack, ponyRes, slot, type); ResourceLocation pony = ponifyResource(human);