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
FieldsModifier and TypeFieldDescriptionprivate final LazyLoadedImageThe field for thebaseImagerecord component.private final Supplier<IntUnaryOperator> The field for thepaletterecord component.private final ResourceLocationThe field for thepermutationLocationrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(SpriteResourceLoader p_295023_) Returns the value of thebaseImagerecord component.voiddiscard()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.palette()Returns the value of thepaletterecord component.Returns the value of thepermutationLocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
baseImage
The field for thebaseImagerecord component. -
palette
The field for thepaletterecord component. -
permutationLocation
The field for thepermutationLocationrecord component.
-
-
Constructor Details
-
PalettedSpriteSupplier
public PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplierrecord class.- Parameters:
baseImage- the value for thebaseImagerecord componentpalette- the value for thepaletterecord componentpermutationLocation- the value for thepermutationLocationrecord component
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<SpriteResourceLoader,SpriteContents>
-
discard
public void discard()- Specified by:
discardin 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 thebaseImagerecord component.- Returns:
- the value of the
baseImagerecord component
-
palette
Returns the value of thepaletterecord component.- Returns:
- the value of the
paletterecord component
-
permutationLocation
Returns the value of thepermutationLocationrecord component.- Returns:
- the value of the
permutationLocationrecord component
-