Record Class ProviderReferenceDefinition
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.ProviderReferenceDefinition
- All Implemented Interfaces:
GlyphProviderDefinition
public record ProviderReferenceDefinition(ResourceLocation id)
extends Record
implements GlyphProviderDefinition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.font.providers.GlyphProviderDefinition
GlyphProviderDefinition.Conditional, GlyphProviderDefinition.Loader, GlyphProviderDefinition.Reference
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<ProviderReferenceDefinition> private final ResourceLocation
The field for theid
record component.Fields inherited from interface net.minecraft.client.gui.font.providers.GlyphProviderDefinition
MAP_CODEC
-
Constructor Summary
ConstructorDescriptionCreates an instance of aProviderReferenceDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.type()
com.mojang.datafixers.util.Either
<GlyphProviderDefinition.Loader, GlyphProviderDefinition.Reference> unpack()
-
Field Details
-
id
The field for theid
record component. -
CODEC
-
-
Constructor Details
-
ProviderReferenceDefinition
Creates an instance of aProviderReferenceDefinition
record class.- Parameters:
id
- the value for theid
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceGlyphProviderDefinition
-
unpack
public com.mojang.datafixers.util.Either<GlyphProviderDefinition.Loader,GlyphProviderDefinition.Reference> unpack()- Specified by:
unpack
in interfaceGlyphProviderDefinition
-
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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-