Added anvil repair support to armor.

This commit is contained in:
cp committed 2014-03-24 09:24:02 +08:00
1 parent 434e0899ed
commit 68596986b1
1 file changed
+6
@@ -18,6 +18,7 @@ import crazypants.enderio.Config;
import crazypants.enderio.EnderIO;
import crazypants.enderio.EnderIOTab;
import crazypants.enderio.machine.power.PowerDisplayUtil;
import crazypants.enderio.material.Alloy;
public class ItemDarkSteelArmor extends ItemArmor implements IEnergyContainerItem, ISpecialArmor {
@@ -198,6 +199,11 @@ public class ItemDarkSteelArmor extends ItemArmor implements IEnergyContainerIte
}
@Override
public boolean getIsRepairable(ItemStack i1, ItemStack i2) {
return i2 != null && i2.getItem() == EnderIO.itemAlloy && i2.getItemDamage() == Alloy.DARK_STEEL.ordinal();
}
private boolean absorbWithPower(ItemStack is) {
NBTTagCompound root = is.getTagCompound();
if(root == null) {