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, Interpolation interpolation)
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, Interpolation interpolation) Creates an instance of aPositionedColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.intcompareTo(@NotNull PositionedColor other) 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) Returns the value of theinterpolationrecord component.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 componentinterpolation- the value for theinterpolationrecord 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 thecomparemethod from their corresponding wrapper classes. -
toString
-
hashCode
-
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
-
interpolation
Returns the value of theinterpolationrecord component.- Returns:
- the value of the
interpolationrecord component
-