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

    Constructors
    Constructor
    Description
    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 a MissileTrackPose record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the contrailScale record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the entityTypeId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    net.minecraft.core.Direction
    Returns the value of the launchFacing record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the launchItemId record component.
    float
    Returns the value of the pitch record component.
    long
    Returns the value of the receiveNanos record component.
    final String
    Returns a string representation of this record class.
    double
    vx()
    Returns the value of the vx record component.
    double
    vy()
    Returns the value of the vy record component.
    double
    vz()
    Returns the value of the vz record component.
    withReceiveNanos(long nanos)
     
    long
    Returns the value of the worldTick record component.
    double
    x()
    Returns the value of the x record component.
    double
    y()
    Returns the value of the y record component.
    float
    yaw()
    Returns the value of the yaw record component.
    double
    z()
    Returns the value of the z record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a MissileTrackPose record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
      vx - the value for the vx record component
      vy - the value for the vy record component
      vz - the value for the vz record component
      yaw - the value for the yaw record component
      pitch - the value for the pitch record component
      launchFacing - the value for the launchFacing record component
      entityTypeId - the value for the entityTypeId record component
      launchItemId - the value for the launchItemId record component
      contrailScale - the value for the contrailScale record component
      worldTick - the value for the worldTick record component
      receiveNanos - the value for the receiveNanos record component
  • Method Details

    • withReceiveNanos

      public MissileTrackPose withReceiveNanos(long nanos)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • x

      public double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public double y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • z

      public double z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component
    • vx

      public double vx()
      Returns the value of the vx record component.
      Returns:
      the value of the vx record component
    • vy

      public double vy()
      Returns the value of the vy record component.
      Returns:
      the value of the vy record component
    • vz

      public double vz()
      Returns the value of the vz record component.
      Returns:
      the value of the vz record component
    • yaw

      public float yaw()
      Returns the value of the yaw record component.
      Returns:
      the value of the yaw record component
    • pitch

      public float pitch()
      Returns the value of the pitch record component.
      Returns:
      the value of the pitch record component
    • launchFacing

      public net.minecraft.core.Direction launchFacing()
      Returns the value of the launchFacing record component.
      Returns:
      the value of the launchFacing record component
    • entityTypeId

      public net.minecraft.resources.ResourceLocation entityTypeId()
      Returns the value of the entityTypeId record component.
      Returns:
      the value of the entityTypeId record component
    • launchItemId

      public net.minecraft.resources.ResourceLocation launchItemId()
      Returns the value of the launchItemId record component.
      Returns:
      the value of the launchItemId record component
    • contrailScale

      public float contrailScale()
      Returns the value of the contrailScale record component.
      Returns:
      the value of the contrailScale record component
    • worldTick

      public long worldTick()
      Returns the value of the worldTick record component.
      Returns:
      the value of the worldTick record component
    • receiveNanos

      public long receiveNanos()
      Returns the value of the receiveNanos record component.
      Returns:
      the value of the receiveNanos record component