Fixed a potential NPE in ItemMetalTool.
Also made swords get damaged properly based on tool material.