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.Logger
static final com.mojang.serialization.MapCodec
<PalettedPermutations> private final ResourceLocation
The field for thepaletteKey
record component.private final Map
<String, ResourceLocation> The field for thepermutations
record component.private final String
The field for theseparator
record component.private final List
<ResourceLocation> The field for thetextures
record 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 aPalettedPermutations
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<PalettedPermutations> codec()
private static IntUnaryOperator
createPaletteMapping
(int[] p_266839_, int[] p_266776_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.private static int[]
loadPaletteEntryFromImage
(ResourceManager p_267184_, ResourceLocation p_267059_) Returns the value of thepaletteKey
record component.Returns the value of thepermutations
record component.void
run
(ResourceManager p_267219_, SpriteSource.Output p_267250_) Returns the value of theseparator
record component.textures()
Returns the value of thetextures
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
textures
The field for thetextures
record component. -
paletteKey
The field for thepaletteKey
record component. -
permutations
The field for thepermutations
record component. -
separator
The field for theseparator
record 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 aPalettedPermutations
record class.- Parameters:
textures
- the value for thetextures
record componentpaletteKey
- the value for thepaletteKey
record componentpermutations
- the value for thepermutations
record componentseparator
- the value for theseparator
record component
-
-
Method Details
-
run
- Specified by:
run
in interfaceSpriteSource
-
createPaletteMapping
-
loadPaletteEntryFromImage
private static int[] loadPaletteEntryFromImage(ResourceManager p_267184_, ResourceLocation p_267059_) -
codec
- Specified by:
codec
in 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 thetextures
record component.- Returns:
- the value of the
textures
record component
-
paletteKey
Returns the value of thepaletteKey
record component.- Returns:
- the value of the
paletteKey
record component
-
permutations
Returns the value of thepermutations
record component.- Returns:
- the value of the
permutations
record component
-
separator
Returns the value of theseparator
record component.- Returns:
- the value of the
separator
record component
-