Fix @ObjectHolderRegistry not properly detecting vanilla class level references. Closes #5958

This commit is contained in:
LexManos committed 2019-07-25 17:59:08 -07:00
1 parent 7411b444d3
commit 731e1920d2
2 files changed
+5 -2

No files matched your search

@@ -105,7 +105,7 @@ public class ObjectHolderRegistry
// double pass - get all the class level annotations first, then the field level annotations
annotations.stream().filter(a -> OBJECT_HOLDER.equals(a.getAnnotationType())).filter(a -> a.getTargetType() == ElementType.TYPE)
.forEach(data -> scanTarget(classModIds, classCache, data.getClassType(), null, (String)data.getAnnotationData().get("value"), true, data.getClassType().getClassName().startsWith("net.minecraft.init")));
.forEach(data -> scanTarget(classModIds, classCache, data.getClassType(), null, (String)data.getAnnotationData().get("value"), true, data.getClassType().getClassName().startsWith("net.minecraft.")));
annotations.stream().filter(a -> OBJECT_HOLDER.equals(a.getAnnotationType())).filter(a -> a.getTargetType() == ElementType.FIELD)
.forEach(data -> scanTarget(classModIds, classCache, data.getClassType(), data.getMemberName(), (String)data.getAnnotationData().get("value"), false, false));