Interface DataGenerationContext
public interface DataGenerationContext
Where a
DataGenerationConstructor adds its providers; everything lands in the mod's generated resources.
On Fabric the PackOutput handed to factories is a FabricPackOutput.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDataGenerationContext.RegistryDependentFactory<T extends net.minecraft.data.DataProvider> -
Method Summary
Modifier and TypeMethodDescription<T extends net.minecraft.data.DataProvider>
TAdds a provider built from the pack output and the registries:context.addProvider(MyRecipeProvider.Runner::new).<T extends net.minecraft.data.DataProvider>
TaddProvider(net.minecraft.data.DataProvider.Factory<T> factory) Adds a provider built from the pack output:context.addProvider(MyLanguageProvider::new).getModId()The mod data is generated for.CompletableFuture<net.minecraft.core.HolderLookup.Provider> The registries (with the loader's additions), for providers that need them.
-
Method Details
-
getModId
String getModId()The mod data is generated for. -
getRegistries
CompletableFuture<net.minecraft.core.HolderLookup.Provider> getRegistries()The registries (with the loader's additions), for providers that need them. -
addProvider
<T extends net.minecraft.data.DataProvider> T addProvider(net.minecraft.data.DataProvider.Factory<T> factory) Adds a provider built from the pack output:context.addProvider(MyLanguageProvider::new). -
addProvider
<T extends net.minecraft.data.DataProvider> T addProvider(DataGenerationContext.RegistryDependentFactory<T> factory) Adds a provider built from the pack output and the registries:context.addProvider(MyRecipeProvider.Runner::new).
-