Record Class SourceFilter
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.SourceFilter
- All Implemented Interfaces:
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 ResourceLocationPatternThe field for thefilterrecord component.static final com.mojang.serialization.MapCodec<SourceFilter> Fields inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
TEXTURE_ID_CONVERTER -
Constructor Summary
ConstructorsConstructorDescriptionSourceFilter(ResourceLocationPattern filter) Creates an instance of aSourceFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SourceFilter> codec()final booleanIndicates whether some other object is "equal to" this one.filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.voidrun(ResourceManager resourceManager, SpriteSource.Output output) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
filter
The field for thefilterrecord component. -
MAP_CODEC
-
-
Constructor Details
-
SourceFilter
Creates an instance of aSourceFilterrecord class.- Parameters:
filter- the value for thefilterrecord 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). -
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-