Package dev.latvian.mods.klib.color
Record Class PositionedColor
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.color.PositionedColor
- All Implemented Interfaces:
Comparable<PositionedColor>
public record PositionedColor(float position, Color color, Easing easing)
extends Record
implements Comparable<PositionedColor>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PositionedColor> static final PositionedColor[]static final PositionedColorstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, PositionedColor> -
Constructor Summary
ConstructorsConstructorDescriptionPositionedColor(float position, Color color) PositionedColor(float position, Color color, Easing easing) Creates an instance of aPositionedColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.intcompareTo(@NotNull PositionedColor other) easing()Returns the value of theeasingrecord component.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.interpolate(float delta, PositionedColor other) floatposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY_ARRAY
-
INVALID
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,PositionedColor> STREAM_CODEC
-
-
Constructor Details
-
PositionedColor
-
PositionedColor
Creates an instance of aPositionedColorrecord class.- Parameters:
position- the value for thepositionrecord componentcolor- the value for thecolorrecord componenteasing- the value for theeasingrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<PositionedColor>
-
interpolate
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
position
public float position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
easing
Returns the value of theeasingrecord component.- Returns:
- the value of the
easingrecord component
-