Record Class PalettedPermutations.PalettedSpriteSupplier
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.PalettedPermutations.PalettedSpriteSupplier
- All Implemented Interfaces:
Function<SpriteResourceLoader,
,SpriteContents> SpriteSource.SpriteSupplier
- Enclosing class:
PalettedPermutations
public static record PalettedPermutations.PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation)
extends Record
implements SpriteSource.SpriteSupplier
-
Field Summary
Modifier and TypeFieldDescriptionprivate final LazyLoadedImage
The field for thebaseImage
record component.private final Supplier
<IntUnaryOperator> The field for thepalette
record component.private final ResourceLocation
The field for thepermutationLocation
record component. -
Constructor Summary
ConstructorDescriptionPalettedSpriteSupplier
(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplier
record class. -
Method Summary
Modifier and TypeMethodDescriptionapply
(SpriteResourceLoader p_295023_) Returns the value of thebaseImage
record component.void
discard()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.palette()
Returns the value of thepalette
record component.Returns the value of thepermutationLocation
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
baseImage
The field for thebaseImage
record component. -
palette
The field for thepalette
record component. -
permutationLocation
The field for thepermutationLocation
record component.
-
-
Constructor Details
-
PalettedSpriteSupplier
public PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplier
record class.- Parameters:
baseImage
- the value for thebaseImage
record componentpalette
- the value for thepalette
record componentpermutationLocation
- the value for thepermutationLocation
record component
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<SpriteResourceLoader,
SpriteContents>
-
discard
public void discard()- Specified by:
discard
in interfaceSpriteSource.SpriteSupplier
-
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)
. -
baseImage
Returns the value of thebaseImage
record component.- Returns:
- the value of the
baseImage
record component
-
palette
Returns the value of thepalette
record component.- Returns:
- the value of the
palette
record component
-
permutationLocation
Returns the value of thepermutationLocation
record component.- Returns:
- the value of the
permutationLocation
record component
-