Record Class BitmapProvider.Definition
java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.providers.BitmapProvider.Definition
- All Implemented Interfaces:
- GlyphProviderDefinition
- Enclosing class:
- BitmapProvider
public static record BitmapProvider.Definition(ResourceLocation file, int height, int ascent, int[][] codepointGrid)
extends Record
implements GlyphProviderDefinition
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.font.providers.GlyphProviderDefinitionGlyphProviderDefinition.Loader, GlyphProviderDefinition.Reference
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for theascentrecord component.static final com.mojang.serialization.MapCodec<BitmapProvider.Definition>private static final com.mojang.serialization.Codec<int[][]>private final int[][]The field for thecodepointGridrecord component.private final ResourceLocationThe field for thefilerecord component.private final intThe field for theheightrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionDefinition(ResourceLocation file, int height, int ascent, int[][] codepointGrid) Creates an instance of aDefinitionrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionintascent()Returns the value of theascentrecord component.int[][]Returns the value of thecodepointGridrecord component.final booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.private intgetActualGlyphWidth(NativeImage p_286449_, int p_286656_, int p_286554_, int p_286657_, int p_286307_) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.private GlyphProviderload(ResourceManager p_286694_) final StringtoString()Returns a string representation of this record class.type()com.mojang.datafixers.util.Either<GlyphProviderDefinition.Loader,GlyphProviderDefinition.Reference> unpack()private static com.mojang.serialization.DataResult<BitmapProvider.Definition>validate(BitmapProvider.Definition p_286662_) private static com.mojang.serialization.DataResult<int[][]>validateDimensions(int[][] p_286348_) 
- 
Field Details- 
fileThe field for thefilerecord component.
- 
heightprivate final int heightThe field for theheightrecord component.
- 
ascentprivate final int ascentThe field for theascentrecord component.
- 
codepointGridprivate final int[][] codepointGridThe field for thecodepointGridrecord component.
- 
CODEPOINT_GRID_CODECprivate static final com.mojang.serialization.Codec<int[][]> CODEPOINT_GRID_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
DefinitionCreates an instance of aDefinitionrecord class.- Parameters:
- file- the value for the- filerecord component
- height- the value for the- heightrecord component
- ascent- the value for the- ascentrecord component
- codepointGrid- the value for the- codepointGridrecord component
 
 
- 
- 
Method Details- 
validateDimensionsprivate static com.mojang.serialization.DataResult<int[][]> validateDimensions(int[][] p_286348_) 
- 
validateprivate static com.mojang.serialization.DataResult<BitmapProvider.Definition> validate(BitmapProvider.Definition p_286662_) 
- 
type- Specified by:
- typein interface- GlyphProviderDefinition
 
- 
unpackpublic com.mojang.datafixers.util.Either<GlyphProviderDefinition.Loader,GlyphProviderDefinition.Reference> unpack()- Specified by:
- unpackin interface- GlyphProviderDefinition
 
- 
load- Throws:
- IOException
 
- 
getActualGlyphWidthprivate int getActualGlyphWidth(NativeImage p_286449_, int p_286656_, int p_286554_, int p_286657_, int p_286307_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
fileReturns the value of thefilerecord component.- Returns:
- the value of the filerecord component
 
- 
heightpublic int height()Returns the value of theheightrecord component.- Returns:
- the value of the heightrecord component
 
- 
ascentpublic int ascent()Returns the value of theascentrecord component.- Returns:
- the value of the ascentrecord component
 
- 
codepointGridpublic int[][] codepointGrid()Returns the value of thecodepointGridrecord component.- Returns:
- the value of the codepointGridrecord component
 
 
-