49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/ItemArmor.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/ItemArmor.java
|
|
@@ -221,6 +221,19 @@
|
|
return multimap;
|
|
}
|
|
|
|
+ /**
|
|
+ * Determines if this armor will be rendered with the secondary 'overlay' texture.
|
|
+ * If this is true, the first texture will be rendered using a tint of the color
|
|
+ * specified by getColor(ItemStack)
|
|
+ *
|
|
+ * @param stack The stack
|
|
+ * @return true/false
|
|
+ */
|
|
+ public boolean hasOverlay(ItemStack stack)
|
|
+ {
|
|
+ return this.field_77878_bZ == ItemArmor.ArmorMaterial.LEATHER || func_82814_b(stack) != 0x00FFFFFF;
|
|
+ }
|
|
+
|
|
public static enum ArmorMaterial
|
|
{
|
|
LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.field_187728_s, 0.0F),
|
|
@@ -235,6 +248,8 @@
|
|
private final int field_78055_h;
|
|
private final SoundEvent field_185020_j;
|
|
private final float field_189417_k;
|
|
+ //Added by forge for custom Armor materials.
|
|
+ public Item customCraftingMaterial = null;
|
|
|
|
private ArmorMaterial(String p_i47117_3_, int p_i47117_4_, int[] p_i47117_5_, int p_i47117_6_, SoundEvent p_i47117_7_, float p_i47117_8_)
|
|
{
|
|
@@ -268,7 +283,15 @@
|
|
|
|
public Item func_151685_b()
|
|
{
|
|
- return this == LEATHER ? Items.field_151116_aA : (this == CHAIN ? Items.field_151042_j : (this == GOLD ? Items.field_151043_k : (this == IRON ? Items.field_151042_j : (this == DIAMOND ? Items.field_151045_i : null))));
|
|
+ switch (this)
|
|
+ {
|
|
+ case LEATHER: return Items.field_151116_aA;
|
|
+ case CHAIN: return Items.field_151042_j;
|
|
+ case GOLD: return Items.field_151043_k;
|
|
+ case IRON: return Items.field_151042_j;
|
|
+ case DIAMOND: return Items.field_151045_i;
|
|
+ default: return customCraftingMaterial;
|
|
+ }
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|