For a mod on modular weapons I need the sword class to recognize hits on mobs/players. If someone could give me the code that would be great.
possibly LivingAttackEvent is what youre looking for
Try not to subscribe to events if you can help it - there's normally already a method for you in classes you're extending.
Override this method in ItemSword:
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
If you give a bit more detail on what exactly you're trying to do we can help some more.
EDIT: Just noticed you're using 1.6.4... hopefully that method is there back then. You should really update.
Yeah, I know its ancient history, but 1.6.4 is one of my favorite versions.