Record Class RegistrySetBuilder.BootstrappedRegistryState<T>

java.lang.Object
java.lang.Record
net.minecraft.core.RegistrySetBuilder.BootstrappedRegistryState<T>
Enclosing class:
RegistrySetBuilder

private static record RegistrySetBuilder.BootstrappedRegistryState<T>(BootstrapRegistry<T> registry, Map<ResourceKey<T>, T> registeredValues, Map<ResourceKey<?>, List<ICondition>> conditions) extends Record
  • Field Details

    • registry

      private final BootstrapRegistry<T> registry
      The field for the registry record component.
    • registeredValues

      private final Map<ResourceKey<T>, T> registeredValues
      The field for the registeredValues record component.
    • conditions

      private final Map<ResourceKey<?>, List<ICondition>> conditions
      The field for the conditions record component.
  • Constructor Details

    • BootstrappedRegistryState

      public BootstrappedRegistryState(BootstrapRegistry<T> registry, Map<ResourceKey<T>, T> registeredValues)
    • BootstrappedRegistryState

      private BootstrappedRegistryState(BootstrapRegistry<T> registry, Map<ResourceKey<T>, T> registeredValues, Map<ResourceKey<?>, List<ICondition>> conditions)
      Creates an instance of a BootstrappedRegistryState record class.
      Parameters:
      registry - the value for the registry record component
      registeredValues - the value for the registeredValues record component
      conditions - the value for the conditions record component
  • Method Details

    • create

      public static <T> RegistrySetBuilder.BootstrappedRegistryState<T> create(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle)
    • createBootstrapContext

      public BootstrapContext<T> createBootstrapContext(RegistrySetBuilder.BuildState state)
    • bindHolders

      public void bindHolders()
    • freeze

      public void freeze()
    • errorOnMissingHolders

      public void errorOnMissingHolders(RegistrySetBuilder.BuildState state)
    • validatePatchHolders

      public void validatePatchHolders(RegistrySetBuilder.BuildState state, HolderLookup.Provider fallback)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • registry

      public BootstrapRegistry<T> registry()
      Returns the value of the registry record component.
      Returns:
      the value of the registry record component
    • registeredValues

      public Map<ResourceKey<T>, T> registeredValues()
      Returns the value of the registeredValues record component.
      Returns:
      the value of the registeredValues record component
    • conditions

      public Map<ResourceKey<?>, List<ICondition>> conditions()
      Returns the value of the conditions record component.
      Returns:
      the value of the conditions record component