- /mt names now outputs the names alphabetically

- Added initial implementation of IC2 and NEI support
- Fixed NPE retrieving names for certain items
This commit is contained in:
Stan Hebben committed 2014-06-22 21:36:17 +02:00
1 parent 8e47ca9317
commit 61f4fe58c6
12 files changed
+234 -25

No files matched your search

@@ -1,5 +1,6 @@
package minetweaker;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import minetweaker.runtime.IMineTweaker;
import minetweaker.runtime.ILogger;
@@ -71,12 +72,16 @@ public class MineTweakerAPI {
* @param annotatedClass
*/
public static void registerClass(Class annotatedClass) {
if (annotatedClass.isAnnotationPresent(ZenExpansion.class)) {
GlobalRegistry.registerExpansion(annotatedClass);
}
System.out.println("Registering " + annotatedClass.getName());
if (annotatedClass.isAnnotationPresent(ZenClass.class)) {
GlobalRegistry.registerNativeClass(annotatedClass);
for (Annotation annotation : annotatedClass.getAnnotations()) {
if (annotation instanceof ZenExpansion) {
GlobalRegistry.registerExpansion(annotatedClass);
}
if (annotation instanceof ZenClass) {
GlobalRegistry.registerNativeClass(annotatedClass);
}
}
}