Record Class RegistrySetBuilder.RegistryStub<T>
java.lang.Object
java.lang.Record
net.minecraft.core.RegistrySetBuilder.RegistryStub<T>
- Enclosing class:
RegistrySetBuilder
private static record RegistrySetBuilder.RegistryStub<T>(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistrySetBuilder.RegistryBootstrap<T> The field for thebootstraprecord component.private final ResourceKey<? extends Registry<T>> The field for thekeyrecord component.private final com.mojang.serialization.LifecycleThe field for thelifecyclerecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegistryStub(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap) Creates an instance of aRegistryStubrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidReturns the value of thebootstraprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ResourceKey<? extends Registry<T>> key()Returns the value of thekeyrecord component.com.mojang.serialization.LifecycleReturns the value of thelifecyclerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
key
The field for thekeyrecord component. -
lifecycle
private final com.mojang.serialization.Lifecycle lifecycleThe field for thelifecyclerecord component. -
bootstrap
The field for thebootstraprecord component.
-
-
Constructor Details
-
RegistryStub
private RegistryStub(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap) Creates an instance of aRegistryStubrecord class.- Parameters:
key- the value for thekeyrecord componentlifecycle- the value for thelifecyclerecord componentbootstrap- the value for thebootstraprecord component
-
-
Method Details
-
apply
-
collectRegisteredValues
public RegistrySetBuilder.RegistryContents<T> collectRegisteredValues(RegistrySetBuilder.BuildState state) -
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
lifecycle
public com.mojang.serialization.Lifecycle lifecycle()Returns the value of thelifecyclerecord component.- Returns:
- the value of the
lifecyclerecord component
-
bootstrap
Returns the value of thebootstraprecord component.- Returns:
- the value of the
bootstraprecord component
-