Record Class CameraFadeState
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.CameraFadeState
public record CameraFadeState(float red, float green, float blue, float elapsed, List<CameraFadeState.Point> points)
extends Record
A core-resolved fade timeline. Elapsed time is relative to its first point.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final CameraFadeStatestatic final com.viaversion.viaversion.api.type.Type<CameraFadeState> -
Constructor Summary
ConstructorsConstructorDescriptionCameraFadeState(float red, float green, float blue, float elapsed, List<CameraFadeState.Point> points) Creates an instance of aCameraFadeStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha(float time) floatblue()Returns the value of thebluerecord component.floatelapsed()Returns the value of theelapsedrecord component.final booleanIndicates whether some other object is "equal to" this one.floatgreen()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.points()Returns the value of thepointsrecord component.floatred()Returns the value of theredrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CHANNEL
- See Also:
-
EMPTY
-
TYPE
-
-
Constructor Details
-
CameraFadeState
public CameraFadeState(float red, float green, float blue, float elapsed, List<CameraFadeState.Point> points) Creates an instance of aCameraFadeStaterecord class.- Parameters:
red- the value for theredrecord componentgreen- the value for thegreenrecord componentblue- the value for thebluerecord componentelapsed- the value for theelapsedrecord componentpoints- the value for thepointsrecord component
-
-
Method Details
-
alpha
public float alpha(float time) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
red
public float red()Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
green
public float green()Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
blue
public float blue()Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-
elapsed
public float elapsed()Returns the value of theelapsedrecord component.- Returns:
- the value of the
elapsedrecord component
-
points
Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-