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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceKey<?>, List<ICondition>> The field for theconditionsrecord component.private final Map<ResourceKey<T>, T> The field for theregisteredValuesrecord component.private final BootstrapRegistry<T> The field for theregistryrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionBootstrappedRegistryState(BootstrapRegistry<T> registry, Map<ResourceKey<T>, T> registeredValues) privateBootstrappedRegistryState(BootstrapRegistry<T> registry, Map<ResourceKey<T>, T> registeredValues, Map<ResourceKey<?>, List<ICondition>> conditions) Creates an instance of aBootstrappedRegistryStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidMap<ResourceKey<?>, List<ICondition>> Returns the value of theconditionsrecord component.static <T> RegistrySetBuilder.BootstrappedRegistryState<T> create(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) final booleanIndicates whether some other object is "equal to" this one.voidvoidfreeze()final inthashCode()Returns a hash code value for this object.Map<ResourceKey<T>, T> Returns the value of theregisteredValuesrecord component.registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.voidvalidatePatchHolders(RegistrySetBuilder.BuildState state, HolderLookup.Provider fallback)
-
Field Details
-
registry
The field for theregistryrecord component. -
registeredValues
The field for theregisteredValuesrecord component. -
conditions
The field for theconditionsrecord 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 aBootstrappedRegistryStaterecord class.- Parameters:
registry- the value for theregistryrecord componentregisteredValues- the value for theregisteredValuesrecord componentconditions- the value for theconditionsrecord component
-
-
Method Details
-
create
public static <T> RegistrySetBuilder.BootstrappedRegistryState<T> create(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) -
createBootstrapContext
-
bindHolders
public void bindHolders() -
freeze
public void freeze() -
errorOnMissingHolders
-
validatePatchHolders
public void validatePatchHolders(RegistrySetBuilder.BuildState state, HolderLookup.Provider fallback) -
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
registeredValues
Returns the value of theregisteredValuesrecord component.- Returns:
- the value of the
registeredValuesrecord component
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-