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
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
SpriteSource.Output, SpriteSource.SpriteSupplier -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(package private) static final org.slf4j.Loggerstatic final com.mojang.serialization.MapCodec<PalettedPermutations> private final ResourceLocationThe field for thepaletteKeyrecord component.private final Map<String, ResourceLocation> The field for thepermutationsrecord component.private final StringThe field for theseparatorrecord component.private final List<ResourceLocation> The field for thetexturesrecord component.Fields inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
TEXTURE_ID_CONVERTER -
Constructor Summary
ConstructorsConstructorDescriptionPalettedPermutations(List<ResourceLocation> p_267282_, ResourceLocation p_266681_, Map<String, ResourceLocation> p_266741_) PalettedPermutations(List<ResourceLocation> textures, ResourceLocation paletteKey, Map<String, ResourceLocation> permutations, String separator) Creates an instance of aPalettedPermutationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<PalettedPermutations> codec()private static IntUnaryOperatorcreatePaletteMapping(int[] pKeys, int[] pValues) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static int[]loadPaletteEntryFromImage(ResourceManager pResourceManager, ResourceLocation pPalette) Returns the value of thepaletteKeyrecord component.Returns the value of thepermutationsrecord component.voidrun(ResourceManager pResourceManager, SpriteSource.Output pOutput) Returns the value of theseparatorrecord component.textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
textures
The field for thetexturesrecord component. -
paletteKey
The field for thepaletteKeyrecord component. -
permutations
The field for thepermutationsrecord component. -
separator
The field for theseparatorrecord component. -
LOGGER
static final org.slf4j.Logger LOGGER -
DEFAULT_SEPARATOR
- See Also:
-
MAP_CODEC
-
-
Constructor Details
-
PalettedPermutations
public PalettedPermutations(List<ResourceLocation> p_267282_, ResourceLocation p_266681_, Map<String, ResourceLocation> p_266741_) -
PalettedPermutations
public PalettedPermutations(List<ResourceLocation> textures, ResourceLocation paletteKey, Map<String, ResourceLocation> permutations, String separator) Creates an instance of aPalettedPermutationsrecord class.- Parameters:
textures- the value for thetexturesrecord componentpaletteKey- the value for thepaletteKeyrecord componentpermutations- the value for thepermutationsrecord componentseparator- the value for theseparatorrecord component
-
-
Method Details
-
run
- Specified by:
runin interfaceSpriteSource
-
createPaletteMapping
-
loadPaletteEntryFromImage
private static int[] loadPaletteEntryFromImage(ResourceManager pResourceManager, ResourceLocation pPalette) -
codec
- Specified by:
codecin interfaceSpriteSource
-
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). -
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
paletteKey
Returns the value of thepaletteKeyrecord component.- Returns:
- the value of the
paletteKeyrecord component
-
permutations
Returns the value of thepermutationsrecord component.- Returns:
- the value of the
permutationsrecord component
-
separator
Returns the value of theseparatorrecord component.- Returns:
- the value of the
separatorrecord component
-