Record Class TrueTypeGlyphProviderDefinition
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.TrueTypeGlyphProviderDefinition
- All Implemented Interfaces:
GlyphProviderDefinition
public record TrueTypeGlyphProviderDefinition(ResourceLocation location, float size, float oversample, TrueTypeGlyphProviderDefinition.Shift shift, String skip)
extends Record
implements GlyphProviderDefinition
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.font.providers.GlyphProviderDefinition
GlyphProviderDefinition.Loader, GlyphProviderDefinition.Reference
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TrueTypeGlyphProviderDefinition>
private final ResourceLocation
The field for thelocation
record component.private final float
The field for theoversample
record component.private final TrueTypeGlyphProviderDefinition.Shift
The field for theshift
record component.private final float
The field for thesize
record component.private final String
The field for theskip
record component.private static final com.mojang.serialization.Codec<String>
-
Constructor Summary
ConstructorDescriptionTrueTypeGlyphProviderDefinition
(ResourceLocation location, float size, float oversample, TrueTypeGlyphProviderDefinition.Shift shift, String skip) Creates an instance of aTrueTypeGlyphProviderDefinition
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.private GlyphProvider
load
(ResourceManager p_286229_) location()
Returns the value of thelocation
record component.float
Returns the value of theoversample
record component.shift()
Returns the value of theshift
record component.float
size()
Returns the value of thesize
record component.skip()
Returns the value of theskip
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
-
location
The field for thelocation
record component. -
size
private final float sizeThe field for thesize
record component. -
oversample
private final float oversampleThe field for theoversample
record component. -
shift
The field for theshift
record component. -
skip
The field for theskip
record component. -
SKIP_LIST_CODEC
-
CODEC
-
-
Constructor Details
-
TrueTypeGlyphProviderDefinition
public TrueTypeGlyphProviderDefinition(ResourceLocation location, float size, float oversample, TrueTypeGlyphProviderDefinition.Shift shift, String skip) Creates an instance of aTrueTypeGlyphProviderDefinition
record class.- Parameters:
location
- the value for thelocation
record componentsize
- the value for thesize
record componentoversample
- the value for theoversample
record componentshift
- the value for theshift
record componentskip
- the value for theskip
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
-
load
- Throws:
IOException
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
size
public float size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
oversample
public float oversample()Returns the value of theoversample
record component.- Returns:
- the value of the
oversample
record component
-
shift
Returns the value of theshift
record component.- Returns:
- the value of the
shift
record component
-
skip
Returns the value of theskip
record component.- Returns:
- the value of the
skip
record component
-