diff --git a/src/main/java/com/minelittlepony/client/model/armour/DefaultArmourTextureResolver.java b/src/main/java/com/minelittlepony/client/model/armour/DefaultArmourTextureResolver.java index 5c70a275..62fdb844 100644 --- a/src/main/java/com/minelittlepony/client/model/armour/DefaultArmourTextureResolver.java +++ b/src/main/java/com/minelittlepony/client/model/armour/DefaultArmourTextureResolver.java @@ -42,16 +42,16 @@ public class DefaultArmourTextureResolver implements IAr String customType = type.isEmpty() ? "" : String.format("_%s", 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 == ArmourLayer.INNER ? 2 : 1, customType); + String res = String.format("%s:textures/models/armor/%s_layer_%s%s.png", domain, texture, layer.name().toLowerCase(), customType); + String oldRes = String.format("%s:textures/models/armor/%s_layer_%d%s.png", domain, texture, layer == ArmourLayer.INNER ? 2 : 1, customType); - Identifier human = getArmorTexture(ponyRes, type); + Identifier human = getArmorTexture(res, type); Identifier pony = ponifyResource(human); - Identifier oldHuman = getArmorTexture(oldPonyRes, type); + Identifier oldHuman = getArmorTexture(oldRes, type); Identifier oldPony = ponifyResource(oldHuman); - return resolve(pony, oldPony, oldHuman, human); + return resolve(oldPony, pony, oldHuman, human); } private Identifier resolve(Identifier... resources) { diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/ArmourFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/ArmourFeature.java index 0512fb34..8ffed01d 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/ArmourFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/ArmourFeature.java @@ -27,7 +27,7 @@ import net.minecraft.util.Identifier; public class ArmourFeature & IPonyModel> extends AbstractPonyFeature { - private static final IArmourTextureResolver textures = new DefaultArmourTextureResolver<>(); + public static final IArmourTextureResolver DEFAULT = new DefaultArmourTextureResolver<>(); public ArmourFeature(IPonyRenderContext renderer) { super(renderer); @@ -58,7 +58,7 @@ public class ArmourFeature & IP armour.setAngles(entity, limbAngle, limbDistance, age, headYaw, headPitch); armour.synchroniseLegs(pony.getBody()); - IArmourTextureResolver resolver = armour instanceof IArmourTextureResolver ? (IArmourTextureResolver)armour : (IArmourTextureResolver)textures; + IArmourTextureResolver resolver = armour instanceof IArmourTextureResolver ? (IArmourTextureResolver)armour : (IArmourTextureResolver)DEFAULT; Identifier armourTexture = resolver.getArmourTexture(entity, itemstack, armorSlot, layer, null); armour.setVariant(resolver.getArmourVariant(layer, armourTexture)); diff --git a/src/main/java/com/minelittlepony/model/armour/IArmourTextureResolver.java b/src/main/java/com/minelittlepony/model/armour/IArmourTextureResolver.java index c972e154..8d08ff59 100644 --- a/src/main/java/com/minelittlepony/model/armour/IArmourTextureResolver.java +++ b/src/main/java/com/minelittlepony/model/armour/IArmourTextureResolver.java @@ -12,7 +12,7 @@ public interface IArmourTextureResolver { /** * Gets the armour texture to be used for the given entity, armour piece, slot, and render layer. */ - Identifier getArmourTexture(T entity, ItemStack itemstack, EquipmentSlot slot, ArmourLayer layer, @Nullable String type); + Identifier getArmourTexture(T entity, ItemStack itemstack, EquipmentSlot slot, ArmourLayer layer, @Nullable String type); /** * Gets the armour variant for the identified texture.