Package devs.beer.nativepackets.api
Record Class NativeMinecartStep
java.lang.Object
java.lang.Record
devs.beer.nativepackets.api.NativeMinecartStep
public record NativeMinecartStep(NativeVector3 position, NativeVector3 movement, float yaw, float pitch, float weight)
extends Record
One minecart interpolation step.
-
Constructor Summary
ConstructorsConstructorDescriptionNativeMinecartStep(NativeVector3 position, NativeVector3 movement, float yaw, float pitch, float weight) Creates an instance of aNativeMinecartSteprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.movement()Returns the value of themovementrecord component.floatpitch()Returns the value of thepitchrecord component.position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.floatweight()Returns the value of theweightrecord component.floatyaw()Returns the value of theyawrecord component.
-
Constructor Details
-
NativeMinecartStep
public NativeMinecartStep(NativeVector3 position, NativeVector3 movement, float yaw, float pitch, float weight) Creates an instance of aNativeMinecartSteprecord class.- Parameters:
position- the value for thepositionrecord componentmovement- the value for themovementrecord componentyaw- the value for theyawrecord componentpitch- the value for thepitchrecord componentweight- the value for theweightrecord 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 '=='. -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
movement
Returns the value of themovementrecord component.- Returns:
- the value of the
movementrecord component
-
yaw
public float yaw()Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
weight
public float weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-