Record Class RegistrySetBuilder.BuildState
java.lang.Object
java.lang.Record
net.minecraft.core.RegistrySetBuilder.BuildState
- Enclosing class:
RegistrySetBuilder
private static record RegistrySetBuilder.BuildState(HolderLookup.Provider contextRegistries, HolderLookup.Provider allRegistries, Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> bootstrappedRegistries, List<RuntimeException> errors)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HolderLookup.ProviderThe field for theallRegistriesrecord component.private final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> The field for thebootstrappedRegistriesrecord component.private final HolderLookup.ProviderThe field for thecontextRegistriesrecord component.private final List<RuntimeException> The field for theerrorsrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBuildState(HolderLookup.Provider contextRegistries, HolderLookup.Provider allRegistries, Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> bootstrappedRegistries, List<RuntimeException> errors) Creates an instance of aBuildStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallRegistriesrecord component.Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> Returns the value of thebootstrappedRegistriesrecord component.Returns the value of thecontextRegistriesrecord component.private static RegistrySetBuilder.BuildStatecreate(HolderLookup.Provider context, List<RegistrySetBuilder.RegistryStub> entries) createAndApply(HolderLookup.Provider context, List<RegistrySetBuilder.RegistryStub> entries) <T> BootstrapContext<T> createBootstrap(ResourceKey<? extends Registry<T>> key) final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.voidfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
contextRegistries
The field for thecontextRegistriesrecord component. -
allRegistries
The field for theallRegistriesrecord component. -
bootstrappedRegistries
private final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> bootstrappedRegistriesThe field for thebootstrappedRegistriesrecord component. -
errors
The field for theerrorsrecord component.
-
-
Constructor Details
-
BuildState
private BuildState(HolderLookup.Provider contextRegistries, HolderLookup.Provider allRegistries, Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> bootstrappedRegistries, List<RuntimeException> errors) Creates an instance of aBuildStaterecord class.- Parameters:
contextRegistries- the value for thecontextRegistriesrecord componentallRegistries- the value for theallRegistriesrecord componentbootstrappedRegistries- the value for thebootstrappedRegistriesrecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
createAndApply
public static RegistrySetBuilder.BuildState createAndApply(HolderLookup.Provider context, List<RegistrySetBuilder.RegistryStub> entries) -
create
private static RegistrySetBuilder.BuildState create(HolderLookup.Provider context, List<RegistrySetBuilder.RegistryStub> entries) -
throwOnError
public void throwOnError() -
createBootstrap
-
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). -
contextRegistries
Returns the value of thecontextRegistriesrecord component.- Returns:
- the value of the
contextRegistriesrecord component
-
allRegistries
Returns the value of theallRegistriesrecord component.- Returns:
- the value of the
allRegistriesrecord component
-
bootstrappedRegistries
public Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.BootstrappedRegistryState<?>> bootstrappedRegistries()Returns the value of thebootstrappedRegistriesrecord component.- Returns:
- the value of the
bootstrappedRegistriesrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-