shouldEquip = true;
} else if (item instanceof ItemSword && oldItem.getItem() instanceof ItemSword) {
ItemSword newSword = (ItemSword) item;
ItemSword oldSword = (ItemSword) oldItem.getItem();
if (newSword.func_82803_g() == oldSword.func_82803_g()) {
shouldEquip = itemStack.getItemDamage() > oldItem.getItemDamage() || itemStack.hasTagCompound() && !oldItem.hasTagCompound();
} else {
shouldEquip = newSword.func_82803_g() > oldSword.func_82803_g();
}
} else {