Package net.thewinnt.cutscenes.util
Record Class DynamicVertex
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.util.DynamicVertex
public record DynamicVertex(CoordinateProvider x, CoordinateProvider y, DynamicColor color)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicVertex(CoordinateProvider x, CoordinateProvider y, DynamicColor color) Creates an instance of aDynamicVertexrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.static DynamicVertexfromJSON(com.google.gson.JsonObject json) static DynamicVertexfromNetwork(net.minecraft.network.FriendlyByteBuf buf) final inthashCode()Returns a hash code value for this object.voidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) final StringtoString()Returns a string representation of this record class.x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.
-
Constructor Details
-
DynamicVertex
Creates an instance of aDynamicVertexrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentcolor- the value for thecolorrecord component
-
-
Method Details
-
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buf) -
fromNetwork
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
x
Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-