Record Class PalettedPermutations

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.PalettedPermutations
All Implemented Interfaces:
SpriteSource

public record PalettedPermutations(List<ResourceLocation> textures, ResourceLocation paletteKey, Map<String,ResourceLocation> permutations, String separator) extends Record implements SpriteSource
  • Field Details

    • textures

      private final List<ResourceLocation> textures
      The field for the textures record component.
    • paletteKey

      private final ResourceLocation paletteKey
      The field for the paletteKey record component.
    • permutations

      private final Map<String,ResourceLocation> permutations
      The field for the permutations record component.
    • separator

      private final String separator
      The field for the separator record component.
    • LOGGER

      static final org.slf4j.Logger LOGGER
    • DEFAULT_SEPARATOR

      public static final String DEFAULT_SEPARATOR
      See Also:
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<PalettedPermutations> MAP_CODEC
  • Constructor Details

  • Method Details

    • run

      public void run(ResourceManager p_267219_, SpriteSource.Output p_267250_)
      Specified by:
      run in interface SpriteSource
    • createPaletteMapping

      private static IntUnaryOperator createPaletteMapping(int[] p_266839_, int[] p_266776_)
    • loadPaletteEntryFromImage

      private static int[] loadPaletteEntryFromImage(ResourceManager p_267184_, ResourceLocation p_267059_)
    • codec

      public com.mojang.serialization.MapCodec<PalettedPermutations> codec()
      Specified by:
      codec in interface SpriteSource
    • 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.
    • textures

      public List<ResourceLocation> textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component
    • paletteKey

      public ResourceLocation paletteKey()
      Returns the value of the paletteKey record component.
      Returns:
      the value of the paletteKey record component
    • permutations

      public Map<String,ResourceLocation> permutations()
      Returns the value of the permutations record component.
      Returns:
      the value of the permutations record component
    • separator

      public String separator()
      Returns the value of the separator record component.
      Returns:
      the value of the separator record component