Interface AdvancementProvider.AdvancementGenerator
- All Known Implementing Classes:
CustomPredicateTest.AdvancementGenerator
,DataGeneratorTest.Advancements
- Enclosing class:
AdvancementProvider
public static interface AdvancementProvider.AdvancementGenerator
An interface used to generated modded advancements. This is parallel to
vanilla's
AdvancementSubProvider
with access to the ExistingFileHelper
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(HolderLookup.Provider registries, Consumer<AdvancementHolder> saver, ExistingFileHelper existingFileHelper) A method used to generate advancements for a mod.default AdvancementSubProvider
toSubProvider
(ExistingFileHelper existingFileHelper) Creates anAdvancementSubProvider
from this generator.
-
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 viaIAdvancementBuilderExtension.save(Consumer, ResourceLocation, ExistingFileHelper)
.- Parameters:
registries
- a lookup for registries and their objectssaver
- a consumer used to write advancements to a fileexistingFileHelper
- a helper used to find whether a file exists
-
toSubProvider
Creates anAdvancementSubProvider
from this generator.- Parameters:
existingFileHelper
- a helper used to find whether a file exists- Returns:
- a sub provider wrapping this generator
-