Interface ForgeAdvancementProvider.AdvancementGenerator

Enclosing class:
ForgeAdvancementProvider

public static interface ForgeAdvancementProvider.AdvancementGenerator
An interface used to generated modded advancements. This is parallel to vanilla's AdvancementSubProvider with access to the ExistingFileHelper.
See Also:
  • Method Details

    • generate

      void generate(HolderLookup.Provider registries, Consumer<AdvancementHolder> saver, ExistingFileHelper existingFileHelper)
      A method used to generate advancements for a mod. Advancements should be built via net.minecraftforge.common.extensions.IForgeAdvancementBuilder#save(Consumer, ResourceLocation, ExistingFileHelper).
      Parameters:
      registries - a lookup for registries and their objects
      saver - a consumer used to write advancements to a file
      existingFileHelper - a helper used to find whether a file exists
    • toSubProvider

      default AdvancementSubProvider toSubProvider(ExistingFileHelper existingFileHelper)
      Creates an AdvancementSubProvider from this generator.
      Parameters:
      existingFileHelper - a helper used to find whether a file exists
      Returns:
      a sub provider wrapping this generator