Package net.thewinnt.cutscenes.util
Record Class CoordinateProvider
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.util.CoordinateProvider
public record CoordinateProvider(boolean isAbsolute, Easing value, CoordinateProvider.CoordinateAnchor anchor)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCoordinateProvider(boolean isAbsolute, Easing value, CoordinateProvider.CoordinateAnchor anchor) Creates an instance of aCoordinateProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionanchor()Returns the value of theanchorrecord component.final booleanIndicates whether some other object is "equal to" this one.static CoordinateProviderfromJSON(com.google.gson.JsonElement json) static CoordinateProviderstatic CoordinateProviderfromNetwork(net.minecraft.network.FriendlyByteBuf buf) floatget(double t, float scale) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAbsoluterecord component.voidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
CoordinateProvider
public CoordinateProvider(boolean isAbsolute, Easing value, CoordinateProvider.CoordinateAnchor anchor) Creates an instance of aCoordinateProviderrecord class.- Parameters:
isAbsolute- the value for theisAbsoluterecord componentvalue- the value for thevaluerecord componentanchor- the value for theanchorrecord component
-
-
Method Details
-
get
public float get(double t, float scale) -
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buf) -
fromNetwork
-
fromJSON
-
fromJSON
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
isAbsolute
public boolean isAbsolute()Returns the value of theisAbsoluterecord component.- Returns:
- the value of the
isAbsoluterecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
anchor
Returns the value of theanchorrecord component.- Returns:
- the value of the
anchorrecord component
-