Record Class DirectoryLister
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.DirectoryLister
- All Implemented Interfaces:
SpriteSource
public record DirectoryLister(String sourcePath, String idPrefix)
extends Record
implements SpriteSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
SpriteSource.Output, SpriteSource.SpriteSupplier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theidPrefixrecord component.static final com.mojang.serialization.MapCodec<DirectoryLister> private final StringThe field for thesourcePathrecord component.Fields inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
TEXTURE_ID_CONVERTER -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryLister(String sourcePath, String idPrefix) Creates an instance of aDirectoryListerrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<DirectoryLister> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.idPrefix()Returns the value of theidPrefixrecord component.voidrun(ResourceManager resourceManager, SpriteSource.Output output) Returns the value of thesourcePathrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sourcePath
The field for thesourcePathrecord component. -
idPrefix
The field for theidPrefixrecord component. -
MAP_CODEC
-
-
Constructor Details
-
DirectoryLister
Creates an instance of aDirectoryListerrecord class.- Parameters:
sourcePath- the value for thesourcePathrecord componentidPrefix- the value for theidPrefixrecord component
-
-
Method Details
-
run
- Specified by:
runin interfaceSpriteSource
-
codec
- Specified by:
codecin interfaceSpriteSource
-
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). -
sourcePath
Returns the value of thesourcePathrecord component.- Returns:
- the value of the
sourcePathrecord component
-
idPrefix
Returns the value of theidPrefixrecord component.- Returns:
- the value of the
idPrefixrecord component
-