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 Details

    • baseImage

      private final LazyLoadedImage baseImage
      The field for the baseImage record component.
    • palette

      private final Supplier<IntUnaryOperator> palette
      The field for the palette record component.
    • permutationLocation

      private final ResourceLocation permutationLocation
      The field for the permutationLocation record component.
  • Constructor Details

    • PalettedSpriteSupplier

      PalettedSpriteSupplier(LazyLoadedImage baseImage, Supplier<IntUnaryOperator> palette, ResourceLocation permutationLocation)
      Creates an instance of a PalettedSpriteSupplier record class.
      Parameters:
      baseImage - the value for the baseImage record component
      palette - the value for the palette record component
      permutationLocation - the value for the permutationLocation record component
  • Method Details

    • apply

      @Nullable public SpriteContents apply(SpriteResourceLoader p_300667_)
      Specified by:
      apply in interface Function<SpriteResourceLoader,SpriteContents>
    • discard

      public void discard()
      Specified by:
      discard in interface SpriteSource.SpriteSupplier
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseImage

      public LazyLoadedImage baseImage()
      Returns the value of the baseImage record component.
      Returns:
      the value of the baseImage record component
    • palette

      public Supplier<IntUnaryOperator> palette()
      Returns the value of the palette record component.
      Returns:
      the value of the palette record component
    • permutationLocation

      public ResourceLocation permutationLocation()
      Returns the value of the permutationLocation record component.
      Returns:
      the value of the permutationLocation record component