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, net.minecraft.util.EasingType ease)
extends Record
implements Comparable<PositionedColor>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PositionedColor> static final PositionedColor[]static final PositionedColorstatic final com.mojang.serialization.Codec<List<PositionedColor>> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, List<PositionedColor>> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, PositionedColor> -
Constructor Summary
ConstructorsConstructorDescriptionPositionedColor(float position, Color color) PositionedColor(float position, Color color, net.minecraft.util.EasingType ease) Creates an instance of aPositionedColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.intcompareTo(@NotNull PositionedColor other) net.minecraft.util.EasingTypeease()Returns the value of theeaserecord component.booleanIndicates whether some other object is "equal to" this one.static List<PositionedColor> fromSimpleList(List<Color> colors) final inthashCode()Returns a hash code value for this object.interpolate(float delta, PositionedColor other) static booleanisSimple(List<PositionedColor> colors) floatposition()Returns the value of thepositionrecord component.toSimpleList(List<PositionedColor> colors) 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 -
LIST_STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, List<PositionedColor>> LIST_STREAM_CODEC -
LIST_CODEC
-
-
Constructor Details
-
PositionedColor
-
PositionedColor
Creates an instance of aPositionedColorrecord class.- Parameters:
position- the value for thepositionrecord componentcolor- the value for thecolorrecord componentease- the value for theeaserecord component
-
-
Method Details
-
fromSimpleList
-
toSimpleList
-
isSimple
-
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
-
ease
public net.minecraft.util.EasingType ease()Returns the value of theeaserecord component.- Returns:
- the value of the
easerecord component
-