Class FrameworkCollectors

java.lang.Object
net.neoforged.testframework.impl.FrameworkCollectors

public final class FrameworkCollectors extends Object
  • Field Details

    • SIDE_FILTER

      private static final Predicate<net.neoforged.neoforgespi.language.ModFileScanData.AnnotationData> SIDE_FILTER
  • Constructor Details

    • FrameworkCollectors

      public FrameworkCollectors()
  • Method Details

    • onInitMethodsWithAnnotation

      public static com.google.common.collect.SetMultimap<OnInit.Stage,Consumer<MutableTestFramework>> onInitMethodsWithAnnotation(net.neoforged.fml.ModContainer container)
      This method collects init listeners based on static methods accepting exactly one parameter of MutableTestFramework (or parent interfaces).
    • templatesWithAnnotation

      public static void templatesWithAnnotation(net.neoforged.fml.ModContainer container, BiConsumer<net.minecraft.resources.ResourceLocation,Supplier<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate>> acceptor)
      This method collects structure templates based on static fields containing either a StructureTemplate, a Supplier of StructureTemplate or a StructureTemplateBuilder, annotated with RegisterStructureTemplate.
    • groupsWithAnnotation

      public static void groupsWithAnnotation(net.neoforged.fml.ModContainer container, Consumer<FrameworkCollectors.GroupData> consumer)
      Collects group information from string fields annotated with TestGroup.
    • findMethodsWithAnnotation

      public static Stream<Method> findMethodsWithAnnotation(net.neoforged.fml.ModContainer container, Predicate<net.neoforged.neoforgespi.language.ModFileScanData.AnnotationData> annotationPredicate, Class<? extends Annotation> annotation)