Fix issue when registering NMS entity classes.

Also made caching fields easier in ReflectionUtil.