Class FabricDynamicRegistryProvider.Entries

java.lang.Object
net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider.Entries
Enclosing class:
FabricDynamicRegistryProvider

public static final class FabricDynamicRegistryProvider.Entries extends Object
  • Constructor Details

  • Method Details

    • getLookups

      public RegistryWrapper.WrapperLookup getLookups()
      Gets access to all registry lookups.
    • getLookup

      public <T> RegistryEntryLookup<T> getLookup(RegistryKey<? extends Registry<T>> registryKey)
      Gets a lookup for entries from the given registry.
    • placedFeatures

      public RegistryEntryLookup<PlacedFeature> placedFeatures()
      Returns a lookup for placed features. Useful when creating biomes.
    • configuredCarvers

      public RegistryEntryLookup<ConfiguredCarver<?>> configuredCarvers()
      Returns a lookup for configured carvers. Useful when creating biomes.
    • ref

      public <T> RegistryEntry<T> ref(RegistryKey<T> key)
      Gets a reference to a registry entry for use in other registrations.
    • add

      public <T> RegistryEntry<T> add(RegistryKey<T> key, T object)
      Adds a new object to be data generated.
      Parameters:
      key - The key of the resource to register.
      object - The object to register.
      Returns:
      a reference to it for use in other objects.
    • add

      public <T> RegistryEntry<T> add(RegistryKey<T> key, T object, ResourceCondition... conditions)
      Adds a new object to be data generated with several resource conditions.
      Parameters:
      key - The key of the resource to register.
      object - The object to register.
      conditions - Conditions that must be satisfied to load this object.
      Returns:
      a reference to it for use in other objects.
    • add

      public <T> void add(RegistryEntry.Reference<T> object)
      Adds a new object to be data generated.
      Parameters:
      object - The object to generate. This registry entry must have both a key and value.
    • add

      public <T> void add(RegistryEntry.Reference<T> object, ResourceCondition... conditions)
      Adds a new object to be data generated with several resource conditions.
      Parameters:
      object - The object to generate. This registry entry must have both a key and value.
      conditions - Conditions that must be satisfied to load this object.
    • add

      public <T> RegistryEntry<T> add(RegistryWrapper.Impl<T> registry, RegistryKey<T> valueKey)
      Adds a new RegistryKey from a given RegistryWrapper.Impl to be data generated.
      Returns:
      a reference to it for use in other objects.
    • add

      public <T> RegistryEntry<T> add(RegistryWrapper.Impl<T> registry, RegistryKey<T> valueKey, ResourceCondition... conditions)
      Adds a new RegistryKey from a given RegistryWrapper.Impl to be data generated.
      Parameters:
      conditions - Conditions that must be satisfied to load this object.
      Returns:
      a reference to it for use in other objects.
    • addAll

      public <T> List<RegistryEntry<T>> addAll(RegistryWrapper.Impl<T> registry)
      All the registry entries whose namespace matches the current effective mod ID will be data generated.
    • getQueuedEntries

      <T> net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider.RegistryEntries<T> getQueuedEntries(RegistryKey<T> key)