@Override
protected boolean canModify (ItemStack input, ItemStack[] recipe)
{
if (input.getItem() instanceof TravelGear)
{
TravelGear gear = (TravelGear) input.getItem();
NBTTagCompound tags = input.getTagCompound().getCompoundTag(gear.getBaseTagName());
int damage = tags.getInteger("Damage");
if (damage > 0)
{
boolean validOutput = true;
int outputs = 0;
for (ItemStack curInput : recipe)
{
if (curInput == null)
continue;
if (areItemStacksEquivalent(curInput, gear.getRepairMaterial(input)))
outputs++;
else
validOutput = false;
}
return validOutput && outputs > 0;