Package net.minecraft.core
Record Class RegistrySetBuilder.RegistryStub<T>
java.lang.Object
java.lang.Record
net.minecraft.core.RegistrySetBuilder.RegistryStub<T>
- Enclosing class:
RegistrySetBuilder
static record RegistrySetBuilder.RegistryStub<T>(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistrySetBuilder.RegistryBootstrap<T>
The field for thebootstrap
record component.private final ResourceKey<? extends Registry<T>>
The field for thekey
record component.private final com.mojang.serialization.Lifecycle
The field for thelifecycle
record component. -
Constructor Summary
ConstructorDescriptionRegistryStub
(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap) Creates an instance of aRegistryStub
record class. -
Method Summary
Modifier and TypeMethodDescription(package private) void
apply
(RegistrySetBuilder.BuildState p_256272_) Returns the value of thebootstrap
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.ResourceKey<? extends Registry<T>>
key()
Returns the value of thekey
record component.com.mojang.serialization.Lifecycle
Returns the value of thelifecycle
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
key
The field for thekey
record component. -
lifecycle
private final com.mojang.serialization.Lifecycle lifecycleThe field for thelifecycle
record component. -
bootstrap
The field for thebootstrap
record component.
-
-
Constructor Details
-
RegistryStub
RegistryStub(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, RegistrySetBuilder.RegistryBootstrap<T> bootstrap) Creates an instance of aRegistryStub
record class.- Parameters:
key
- the value for thekey
record componentlifecycle
- the value for thelifecycle
record componentbootstrap
- the value for thebootstrap
record component
-
-
Method Details
-
apply
-
collectRegisteredValues
public RegistrySetBuilder.RegistryContents<T> collectRegisteredValues(RegistrySetBuilder.BuildState p_256416_) -
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. -
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. -
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 thekey
record component.- Returns:
- the value of the
key
record component
-
lifecycle
public com.mojang.serialization.Lifecycle lifecycle()Returns the value of thelifecycle
record component.- Returns:
- the value of the
lifecycle
record component
-
bootstrap
Returns the value of thebootstrap
record component.- Returns:
- the value of the
bootstrap
record component
-