Reformat ItemArmor$ArmorMaterial.getBaseItem to use an if/then/else structure. The switch
causes the generation of an internal class which may derp custom armor addition. Closes #1799
This commit is contained in:
parent
dcb2f2588c
commit
7e9d2fb509
1 changed files with 7 additions and 10 deletions
|
@ -19,20 +19,17 @@
|
||||||
private ArmorMaterial(int p_i1827_3_, int[] p_i1827_4_, int p_i1827_5_)
|
private ArmorMaterial(int p_i1827_3_, int[] p_i1827_4_, int p_i1827_5_)
|
||||||
{
|
{
|
||||||
this.field_78048_f = p_i1827_3_;
|
this.field_78048_f = p_i1827_3_;
|
||||||
@@ -283,7 +286,15 @@
|
@@ -283,7 +286,12 @@
|
||||||
|
|
||||||
public Item func_151685_b()
|
public Item func_151685_b()
|
||||||
{
|
{
|
||||||
- return this == CLOTH ? 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))));
|
- return this == CLOTH ? 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)
|
+ return this == CLOTH ? Items.field_151116_aA :
|
||||||
+ {
|
+ (this == CHAIN ? Items.field_151042_j :
|
||||||
+ case CLOTH: return Items.field_151116_aA;
|
+ (this == GOLD ? Items.field_151043_k :
|
||||||
+ case CHAIN: return Items.field_151042_j;
|
+ (this == IRON ? Items.field_151042_j :
|
||||||
+ case GOLD: return Items.field_151043_k;
|
+ (this == DIAMOND ? Items.field_151045_i :
|
||||||
+ case IRON: return Items.field_151042_j;
|
+ customCraftingMaterial))));
|
||||||
+ case DIAMOND: return Items.field_151045_i;
|
|
||||||
+ default: return customCraftingMaterial;
|
|
||||||
+ }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue