RegisterHamFromEntity checks the entitys classname and registeres a hook for all entitys whith the same classname. if your classname was a info_target, it will register a hook for info_target even though you might have changed the classname.
all you have to do is a single Ham_Think hook for info_targets and check which costum entities id matches the send one of Ham_Think