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 FabricDataOutput.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    DataGenerationContext.RegistryDependentFactory<T extends net.minecraft.data.DataProvider>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends net.minecraft.data.DataProvider>
    T
    Adds a provider built from the pack output and the registries: context.addProvider(MyRecipeProvider.Runner::new).
    <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).
    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).