Class RegistryProviderBase

java.lang.Object
org.moddingx.libx.datagen.provider.RegistryProviderBase
All Implemented Interfaces:
RegistryProvider
Direct Known Subclasses:
AnyTemplateProviderBase, BiomeLayerProviderBase, BiomeModifierProviderBase, BiomeProviderBase, DamageTypeProviderBase, DimensionProviderBase, DimensionTypeProviderBase, FeatureProviderBase, NoiseProviderBase, StructureProcessorProviderBase, StructureProviderBase, StructureSetProviderBase, SurfaceProviderBase

public abstract class RegistryProviderBase extends Object implements RegistryProvider
Base provider for all SandBox data providers. Handles registering values from public Holder fields inside the provider to the registries. These fields should contain intrusive holders created through the current RegistrySet.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final DatagenContext
     
    protected final ModX
     
    protected final RegistrySet
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final <T> net.minecraft.core.HolderSet<T>
    and(net.minecraft.core.HolderSet<T>... sets)
    Gets a holder set that matches the intersection of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    and(net.minecraft.core.HolderSet<T> a, net.minecraft.tags.TagKey<T> b)
    Gets a holder set that matches the intersection of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    and(net.minecraft.tags.TagKey<T> a, net.minecraft.core.HolderSet<T> b)
    Gets a holder set that matches the intersection of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    and(net.minecraft.tags.TagKey<T> a, net.minecraft.tags.TagKey<T> b)
    Gets a holder set that matches the intersection of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    any(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
    Gets a holder set matching any value from the given registry.
    final <T> net.minecraft.core.Holder.Reference<T>
    holder(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, T value)
    Gets a holder from a value.
    final <T> net.minecraft.core.Holder.Reference<T>
    holder(net.minecraft.resources.ResourceKey<T> key)
    Gets a holder from a registry key.
    final <T> net.minecraft.core.HolderSet<T>
    not(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.core.HolderSet<T> set)
    Gets a holder set matching any value not in the given holder set.
    final <T> net.minecraft.core.HolderSet<T>
    not(net.minecraft.tags.TagKey<T> tag)
    Gets a holder set matching any value not in the given tag.
    final <T> net.minecraft.core.HolderSet<T>
    or(net.minecraft.core.HolderSet<T>... sets)
    Gets a holder set that matches the union of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    or(net.minecraft.core.HolderSet<T> a, net.minecraft.tags.TagKey<T> b)
    Gets a holder set that matches the union of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    or(net.minecraft.tags.TagKey<T> a, net.minecraft.core.HolderSet<T> b)
    Gets a holder set that matches the union of the given sets.
    final <T> net.minecraft.core.HolderSet<T>
    or(net.minecraft.tags.TagKey<T> a, net.minecraft.tags.TagKey<T> b)
    Gets a holder set that matches the union of the given sets.
    void
    run()
     
    final <T> net.minecraft.core.HolderSet<T>
    set(net.minecraft.core.Holder<T>... elements)
    Gets a direct holder set from the given elements.
    final <T> net.minecraft.core.HolderSet<T>
    set(net.minecraft.tags.TagKey<T> tag)
    Gets a holder set matching a tag.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.moddingx.libx.datagen.RegistryProvider

    getName
  • Field Details

  • Constructor Details

  • Method Details

    • holder

      public final <T> net.minecraft.core.Holder.Reference<T> holder(net.minecraft.resources.ResourceKey<T> key)
      Gets a holder from a registry key. The current registry set must contain a matching element.
    • holder

      public final <T> net.minecraft.core.Holder.Reference<T> holder(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, T value)
      Gets a holder from a value. The current registry set must contain a matching element.
    • set

      @SafeVarargs public final <T> net.minecraft.core.HolderSet<T> set(net.minecraft.core.Holder<T>... elements)
      Gets a direct holder set from the given elements.
    • set

      public final <T> net.minecraft.core.HolderSet<T> set(net.minecraft.tags.TagKey<T> tag)
      Gets a holder set matching a tag.
    • any

      public final <T> net.minecraft.core.HolderSet<T> any(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
      Gets a holder set matching any value from the given registry.
    • not

      public final <T> net.minecraft.core.HolderSet<T> not(net.minecraft.tags.TagKey<T> tag)
      Gets a holder set matching any value not in the given tag.
    • not

      public final <T> net.minecraft.core.HolderSet<T> not(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.core.HolderSet<T> set)
      Gets a holder set matching any value not in the given holder set.
    • and

      public final <T> net.minecraft.core.HolderSet<T> and(net.minecraft.tags.TagKey<T> a, net.minecraft.tags.TagKey<T> b)
      Gets a holder set that matches the intersection of the given sets.
    • and

      public final <T> net.minecraft.core.HolderSet<T> and(net.minecraft.tags.TagKey<T> a, net.minecraft.core.HolderSet<T> b)
      Gets a holder set that matches the intersection of the given sets.
    • and

      public final <T> net.minecraft.core.HolderSet<T> and(net.minecraft.core.HolderSet<T> a, net.minecraft.tags.TagKey<T> b)
      Gets a holder set that matches the intersection of the given sets.
    • and

      @SafeVarargs public final <T> net.minecraft.core.HolderSet<T> and(net.minecraft.core.HolderSet<T>... sets)
      Gets a holder set that matches the intersection of the given sets.
    • or

      public final <T> net.minecraft.core.HolderSet<T> or(net.minecraft.tags.TagKey<T> a, net.minecraft.tags.TagKey<T> b)
      Gets a holder set that matches the union of the given sets.
    • or

      public final <T> net.minecraft.core.HolderSet<T> or(net.minecraft.tags.TagKey<T> a, net.minecraft.core.HolderSet<T> b)
      Gets a holder set that matches the union of the given sets.
    • or

      public final <T> net.minecraft.core.HolderSet<T> or(net.minecraft.core.HolderSet<T> a, net.minecraft.tags.TagKey<T> b)
      Gets a holder set that matches the union of the given sets.
    • or

      @SafeVarargs public final <T> net.minecraft.core.HolderSet<T> or(net.minecraft.core.HolderSet<T>... sets)
      Gets a holder set that matches the union of the given sets.
    • run

      public void run()
      Specified by:
      run in interface RegistryProvider