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
static record PalettedPermutations.PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation)
extends Record
implements SpriteSource.SpriteSupplier
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionPalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplierrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionapply(SpriteResourceLoader p_300667_) 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- 
baseImageThe field for thebaseImagerecord component.
- 
paletteThe field for thepaletterecord component.
- 
permutationLocationThe field for thepermutationLocationrecord component.
 
- 
- 
Constructor Details- 
PalettedSpriteSupplierPalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation) Creates an instance of aPalettedSpriteSupplierrecord class.- Parameters:
- baseImage- the value for the- baseImagerecord component
- palette- the value for the- paletterecord component
- permutationLocation- the value for the- permutationLocationrecord component
 
 
- 
- 
Method Details- 
apply- Specified by:
- applyin interface- Function<SpriteResourceLoader,- SpriteContents> 
 
- 
discardpublic void discard()- Specified by:
- discardin interface- SpriteSource.SpriteSupplier
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
baseImageReturns the value of thebaseImagerecord component.- Returns:
- the value of the baseImagerecord component
 
- 
paletteReturns the value of thepaletterecord component.- Returns:
- the value of the paletterecord component
 
- 
permutationLocationReturns the value of thepermutationLocationrecord component.- Returns:
- the value of the permutationLocationrecord component
 
 
-