类 DatapackBuiltinEntriesProvider

java.lang.Object
net.minecraft.data.registries.RegistriesDatapackGenerator
net.minecraftforge.common.data.DatapackBuiltinEntriesProvider
所有已实现的接口:
DataProvider

public class DatapackBuiltinEntriesProvider extends RegistriesDatapackGenerator
An extension of the RegistriesDatapackGenerator which properly handles referencing existing dynamic registry objects within another dynamic registry object.
  • 构造器详细资料

    • 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.
      参数:
      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(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 the RegistrySetBuilder.
      参数:
      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
  • 方法详细资料

    • 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.
      参数:
      original - a future of a lookup for registries and their objects
      datapackEntriesBuilder - a builder containing the dynamic registry objects added by this provider
      返回:
      a new lookup containing the existing and to be generated registries and their objects