Record Class DynamicColor
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.util.DynamicColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicColorstatic final com.mojang.serialization.Codec<DynamicColor> static final com.mojang.serialization.Codec<DynamicColor> static final com.mojang.serialization.Codec<DynamicColor> static final com.mojang.serialization.Codec<DynamicColor> static final DynamicColor -
Constructor Summary
ConstructorsConstructorDescriptionDynamicColor(Easing r, Easing g, Easing b, Easing a) Creates an instance of aDynamicColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptiona()Returns the value of thearecord component.b()Returns the value of thebrecord component.final booleanIndicates whether some other object is "equal to" this one.static DynamicColorfromJSON(@NotNull com.google.gson.JsonElement json) static DynamicColorfromJSON(@Nullable com.google.gson.JsonElement json, DynamicColor fallback) static DynamicColorfromNetwork(net.minecraft.network.FriendlyByteBuf buf) g()Returns the value of thegrecord component.final inthashCode()Returns a hash code value for this object.r()Returns the value of therrecord component.float[]sample(double t) inttoARGB(double t) voidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
BLACK
-
WHITE
-
DIRECT_CODEC
-
STRING_CODEC
-
LIST_CODEC
-
CODEC
-
-
Constructor Details
-
DynamicColor
-
-
Method Details
-
toARGB
public int toARGB(double t) -
sample
public float[] sample(double t) -
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buf) -
fromNetwork
-
fromJSON
-
fromJSON
public static DynamicColor fromJSON(@Nullable @Nullable com.google.gson.JsonElement json, DynamicColor fallback) -
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). -
r
Returns the value of therrecord component.- Returns:
- the value of the
rrecord component
-
g
Returns the value of thegrecord component.- Returns:
- the value of the
grecord component
-
b
Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-
a
Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-