Package com.hbm_m.missile.track
Record Class MissileTrackPose
java.lang.Object
java.lang.Record
com.hbm_m.missile.track.MissileTrackPose
public record MissileTrackPose(double x, double y, double z, double vx, double vy, double vz, float yaw, float pitch, net.minecraft.core.Direction launchFacing, net.minecraft.resources.ResourceLocation entityTypeId, net.minecraft.resources.ResourceLocation launchItemId, float contrailScale, long worldTick, long receiveNanos)
extends Record
Authoritative missile pose from the server (network track snapshot).
-
Constructor Summary
ConstructorsConstructorDescriptionMissileTrackPose(double x, double y, double z, double vx, double vy, double vz, float yaw, float pitch, net.minecraft.core.Direction launchFacing, net.minecraft.resources.ResourceLocation entityTypeId, net.minecraft.resources.ResourceLocation launchItemId, float contrailScale, long worldTick, long receiveNanos) Creates an instance of aMissileTrackPoserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thecontrailScalerecord component.net.minecraft.resources.ResourceLocationReturns the value of theentityTypeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.core.DirectionReturns the value of thelaunchFacingrecord component.net.minecraft.resources.ResourceLocationReturns the value of thelaunchItemIdrecord component.floatpitch()Returns the value of thepitchrecord component.longReturns the value of thereceiveNanosrecord component.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.withReceiveNanos(long nanos) longReturns the value of theworldTickrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.floatyaw()Returns the value of theyawrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
MissileTrackPose
public MissileTrackPose(double x, double y, double z, double vx, double vy, double vz, float yaw, float pitch, net.minecraft.core.Direction launchFacing, net.minecraft.resources.ResourceLocation entityTypeId, net.minecraft.resources.ResourceLocation launchItemId, float contrailScale, long worldTick, long receiveNanos) Creates an instance of aMissileTrackPoserecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentvx- the value for thevxrecord componentvy- the value for thevyrecord componentvz- the value for thevzrecord componentyaw- the value for theyawrecord componentpitch- the value for thepitchrecord componentlaunchFacing- the value for thelaunchFacingrecord componententityTypeId- the value for theentityTypeIdrecord componentlaunchItemId- the value for thelaunchItemIdrecord componentcontrailScale- the value for thecontrailScalerecord componentworldTick- the value for theworldTickrecord componentreceiveNanos- the value for thereceiveNanosrecord component
-
-
Method Details
-
withReceiveNanos
-
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 '=='. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord 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
-
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
-
launchFacing
public net.minecraft.core.Direction launchFacing()Returns the value of thelaunchFacingrecord component.- Returns:
- the value of the
launchFacingrecord component
-
entityTypeId
public net.minecraft.resources.ResourceLocation entityTypeId()Returns the value of theentityTypeIdrecord component.- Returns:
- the value of the
entityTypeIdrecord component
-
launchItemId
public net.minecraft.resources.ResourceLocation launchItemId()Returns the value of thelaunchItemIdrecord component.- Returns:
- the value of the
launchItemIdrecord component
-
contrailScale
public float contrailScale()Returns the value of thecontrailScalerecord component.- Returns:
- the value of the
contrailScalerecord component
-
worldTick
public long worldTick()Returns the value of theworldTickrecord component.- Returns:
- the value of the
worldTickrecord component
-
receiveNanos
public long receiveNanos()Returns the value of thereceiveNanosrecord component.- Returns:
- the value of the
receiveNanosrecord component
-