Package net.thewinnt.cutscenes.util
Record Class DynamicColor
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.util.DynamicColor
-
Field Summary
Fields -
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
-
-
Constructor Details
-
DynamicColor
Creates an instance of aDynamicColorrecord class.- Parameters:
r- the value for therrecord componentg- the value for thegrecord componentb- the value for thebrecord componenta- the value for thearecord component
-
-
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
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. -
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
-