Fixed colored leather armor, and custom armor textures.

This commit is contained in:
LexManos 2015-12-08 00:54:27 -08:00
parent 01f4a627be
commit 12cd28715a

View file

@ -1,13 +1,14 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/layers/LayerArmorBase.java
@@ -55,28 +55,28 @@
@@ -55,28 +55,27 @@
T t = this.func_177175_a(p_177182_9_);
t.func_178686_a(this.field_177190_a.func_177087_b());
t.func_78086_a(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_4_);
+ t = getArmorModelHook(p_177182_1_, itemstack, p_177182_9_, t);
this.func_177179_a(t, p_177182_9_);
boolean flag = this.func_177180_b(p_177182_9_);
this.field_177190_a.func_110776_a(this.func_177181_a(itemarmor, flag));
- this.field_177190_a.func_110776_a(this.func_177181_a(itemarmor, flag));
+ this.field_177190_a.func_110776_a(this.getArmorResource(p_177182_1_, itemstack, flag ? 2 : 1, null));
- switch (itemarmor.func_82812_d())
- {
@ -28,8 +29,7 @@
- case DIAMOND:
+ this.field_177190_a.func_110776_a(this.getArmorResource(p_177182_1_, itemstack, flag ? 2 : 1, "overlay"));
+ }
+ else // Non-colored
+ {
+ { // Non-colored
GlStateManager.func_179131_c(this.field_177184_f, this.field_177185_g, this.field_177192_h, this.field_177187_e);
t.func_78088_a(p_177182_1_, p_177182_2_, p_177182_3_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
- default:
@ -39,7 +39,7 @@
if (!this.field_177193_i && itemstack.func_77948_v())
{
this.func_177183_a(p_177182_1_, t, p_177182_2_, p_177182_3_, p_177182_4_, p_177182_5_, p_177182_6_, p_177182_7_, p_177182_8_);
@@ -135,11 +135,13 @@
@@ -135,11 +134,13 @@
GlStateManager.func_179084_k();
}
@ -53,7 +53,7 @@
private ResourceLocation func_177178_a(ItemArmor p_177178_1_, boolean p_177178_2_, String p_177178_3_)
{
String s = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {p_177178_1_.func_82812_d().func_179242_c(), Integer.valueOf(p_177178_2_ ? 2 : 1), p_177178_3_ == null ? "" : String.format("_%s", new Object[]{p_177178_3_})});
@@ -157,4 +159,49 @@
@@ -157,4 +158,49 @@
protected abstract void func_177177_a();
protected abstract void func_177179_a(T p_177179_1_, int p_177179_2_);