Package net.minecraftforge.common.data
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 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 vianet.minecraftforge.common.extensions.IForgeAdvancementBuilder#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
-