Package dev.deepcore.challenge.preview
Record Class DestroyPreviewEntry
java.lang.Object
java.lang.Record
dev.deepcore.challenge.preview.DestroyPreviewEntry
Represents one preview entity with per-tick destroy animation velocity.
-
Constructor Summary
ConstructorsConstructorDescriptionDestroyPreviewEntry(UUID entityId, double vx, double vy, double vz) Creates an instance of aDestroyPreviewEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doublevx()Returns the value of thevxrecord component.doublevy()Returns the value of thevyrecord component.doublevz()Returns the value of thevzrecord component.
-
Constructor Details
-
DestroyPreviewEntry
Creates an instance of aDestroyPreviewEntryrecord class.- Parameters:
entityId- the value for theentityIdrecord componentvx- the value for thevxrecord componentvy- the value for thevyrecord componentvz- the value for thevzrecord component
-
-
Method Details
-
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 '=='. -
entityId
Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
vx
public double vx()Returns the value of thevxrecord component.- Returns:
- the value of the
vxrecord component
-
vy
public double vy()Returns the value of thevyrecord component.- Returns:
- the value of the
vyrecord component
-
vz
public double vz()Returns the value of thevzrecord component.- Returns:
- the value of the
vzrecord component
-