Record Class PaletteMapping
java.lang.Object
java.lang.Record
net.minecraft.client.resources.palette.PaletteMapping
- All Implemented Interfaces:
it.unimi.dsi.fastutil.ints.IntUnaryOperator, Function<Integer,Integer>, IntUnaryOperator, UnaryOperator<Integer>
public record PaletteMapping(it.unimi.dsi.fastutil.ints.Int2IntMap palette)
extends Record
implements it.unimi.dsi.fastutil.ints.IntUnaryOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PaletteMappingprivate final it.unimi.dsi.fastutil.ints.Int2IntMapThe field for thepaletterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPaletteMapping(it.unimi.dsi.fastutil.ints.Int2IntMap palette) Creates an instance of aPaletteMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintapply(int baseColor) static PaletteMappingfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.it.unimi.dsi.fastutil.ints.Int2IntMappalette()Returns the value of thepaletterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface it.unimi.dsi.fastutil.ints.IntUnaryOperator
apply, applyAsIntMethods inherited from interface IntUnaryOperator
andThen, compose
-
Field Details
-
palette
private final it.unimi.dsi.fastutil.ints.Int2IntMap paletteThe field for thepaletterecord component. -
NONE
-
-
Constructor Details
-
PaletteMapping
public PaletteMapping(it.unimi.dsi.fastutil.ints.Int2IntMap palette) Creates an instance of aPaletteMappingrecord class.- Parameters:
palette- the value for thepaletterecord component
-
-
Method Details
-
create
-
apply
public int apply(int baseColor) - Specified by:
applyin interfaceit.unimi.dsi.fastutil.ints.IntUnaryOperator
-
toString
-
hashCode
-
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). -
palette
public it.unimi.dsi.fastutil.ints.Int2IntMap palette()Returns the value of thepaletterecord component.- Returns:
- the value of the
paletterecord component
-