Class DatapackBuiltinEntriesProvider

java.lang.Object
net.minecraft.data.registries.RegistriesDatapackGenerator
net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider
Direct Known Subclasses:
BiomeModifierTest.BiomeModifiers

public class DatapackBuiltinEntriesProvider extends net.minecraft.data.registries.RegistriesDatapackGenerator
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

    net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final CompletableFuture<net.minecraft.core.HolderLookup.Provider>
     

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.RegistrySetBuilder datapackEntriesBuilder, Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionsBuilder, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.RegistrySetBuilder datapackEntriesBuilder, Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>> conditions, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.RegistrySetBuilder datapackEntriesBuilder, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> registries, Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionsBuilder, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> registries, Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>> conditions, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
    DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> registries, Set<String> modIds)
    Constructs a new datapack provider which generates all registry objects from the provided mods using the holder.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>>
    buildConditionsMap(Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionBuilder)
     
    CompletableFuture<net.minecraft.core.HolderLookup.Provider>
    Get the registry holder lookup provider that includes elements added from the RegistrySetBuilder

    Methods inherited from class net.minecraft.data.registries.RegistriesDatapackGenerator

    getName, run

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • fullRegistries

      private final CompletableFuture<net.minecraft.core.HolderLookup.Provider> fullRegistries
  • Constructor Details

    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> 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 generator
      registries - a future of a lookup for registries and their objects
      modIds - a set of mod ids to generate the dynamic registry objects of
    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> registries, Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionsBuilder, 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 generator
      registries - a future of a lookup for registries and their objects
      conditionsBuilder - a builder for conditions to append to registry objects
      modIds - a set of mod ids to generate the dynamic registry objects of
    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.RegistrySetBuilder.PatchedRegistries> registries, Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>> conditions, 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 generator
      registries - a future of a lookup for registries and their objects
      conditions - a map containing conditions to append to registry objects
      modIds - a set of mod ids to generate the dynamic registry objects of
    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.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 the RegistrySetBuilder.
      Parameters:
      output - the target directory of the data generator
      registries - a future of a lookup for registries and their objects
      datapackEntriesBuilder - a builder containing the dynamic registry objects added by this provider
      modIds - a set of mod ids to generate the dynamic registry objects of
    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.RegistrySetBuilder datapackEntriesBuilder, Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>> conditions, 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 the RegistrySetBuilder.
      Parameters:
      output - the target directory of the data generator
      registries - a future of a lookup for registries and their objects
      datapackEntriesBuilder - a builder containing the dynamic registry objects added by this provider
      conditions - a map containing conditions to append to registry objects
      modIds - a set of mod ids to generate the dynamic registry objects of
    • DatapackBuiltinEntriesProvider

      public DatapackBuiltinEntriesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, net.minecraft.core.RegistrySetBuilder datapackEntriesBuilder, Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionsBuilder, 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 the RegistrySetBuilder.
      Parameters:
      output - the target directory of the data generator
      registries - a future of a lookup for registries and their objects
      datapackEntriesBuilder - a builder containing the dynamic registry objects added by this provider
      conditionsBuilder - a builder for conditions to append to registry objects
      modIds - a set of mod ids to generate the dynamic registry objects of
  • Method Details

    • getRegistryProvider

      public CompletableFuture<net.minecraft.core.HolderLookup.Provider> getRegistryProvider()
      Get the registry holder lookup provider that includes elements added from the RegistrySetBuilder
    • buildConditionsMap

      private static Map<net.minecraft.resources.ResourceKey<?>,List<ICondition>> buildConditionsMap(Consumer<BiConsumer<net.minecraft.resources.ResourceKey<?>,ICondition>> conditionBuilder)