Package net.minecraftforge.common.data
Class DatapackBuiltinEntriesProvider
java.lang.Object
net.minecraft.data.registries.RegistriesDatapackGenerator
net.minecraftforge.common.data.DatapackBuiltinEntriesProvider
- All Implemented Interfaces:
DataProvider
An extension of the
RegistriesDatapackGenerator
which properly handles
referencing existing dynamic registry objects within another dynamic registry
object.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR
-
Constructor Summary
ConstructorDescriptionDatapackBuiltinEntriesProvider
(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, Set<String> modIds) Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.DatapackBuiltinEntriesProvider
(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, RegistrySetBuilder datapackEntriesBuilder, Set<String> modIds) Constructs a new datapack provider which generates all registry objects from the provided mods using the holder. -
Method Summary
Modifier and TypeMethodDescriptionprivate static HolderLookup.Provider
constructRegistries
(HolderLookup.Provider original, RegistrySetBuilder datapackEntriesBuilder) A method used to construct empty bootstraps for all registries this provider did not touch such that existing dynamic registry objects do not get inlined.Methods inherited from class net.minecraft.data.registries.RegistriesDatapackGenerator
getName, run
-
Constructor Details
-
DatapackBuiltinEntriesProvider
public DatapackBuiltinEntriesProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, Set<String> modIds) Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.- Parameters:
output
- the target directory of the data generatorregistries
- a future of a lookup for registries and their objectsmodIds
- a set of mod ids to generate the dynamic registry objects of
-
DatapackBuiltinEntriesProvider
public DatapackBuiltinEntriesProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries, RegistrySetBuilder datapackEntriesBuilder, Set<String> modIds) Constructs a new datapack provider which generates all registry objects from the provided mods using the holder. All entries that need to be bootstrapped are provided within theRegistrySetBuilder
.- Parameters:
output
- the target directory of the data generatorregistries
- a future of a lookup for registries and their objectsdatapackEntriesBuilder
- a builder containing the dynamic registry objects added by this providermodIds
- a set of mod ids to generate the dynamic registry objects of
-
-
Method Details
-
constructRegistries
private static HolderLookup.Provider constructRegistries(HolderLookup.Provider original, RegistrySetBuilder datapackEntriesBuilder) A method used to construct empty bootstraps for all registries this provider did not touch such that existing dynamic registry objects do not get inlined.- Parameters:
original
- a future of a lookup for registries and their objectsdatapackEntriesBuilder
- a builder containing the dynamic registry objects added by this provider- Returns:
- a new lookup containing the existing and to be generated registries and their objects
-