Record Class MovementCorrectionTiming

java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.model.MovementCorrectionTiming

public record MovementCorrectionTiming(long serverTick, long inputTick, long inputFrame, long historyStartTick, long followingFrame) extends Record
Native unsigned input clocks bound to the connection's monotonically increasing physics frames.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MovementCorrectionTiming(long serverTick, long inputTick, long inputFrame, long historyStartTick, long followingFrame)
    Creates an instance of a MovementCorrectionTiming record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the followingFrame record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the historyStartTick record component.
    long
    Returns the value of the inputFrame record component.
    long
    Returns the value of the inputTick record component.
    locate(long oldestFrame, long completedFrame)
    The receiver queues into the following snapshot, capped at the newest retained snapshot.
    locateMotion(long oldestFrame, long completedFrame)
    Explicit velocity commands clamp old clocks to the oldest retained native input.
    long
    Returns the value of the serverTick record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MovementCorrectionTiming

      public MovementCorrectionTiming(long serverTick, long inputTick, long inputFrame, long historyStartTick, long followingFrame)
      Creates an instance of a MovementCorrectionTiming record class.
      Parameters:
      serverTick - the value for the serverTick record component
      inputTick - the value for the inputTick record component
      inputFrame - the value for the inputFrame record component
      historyStartTick - the value for the historyStartTick record component
      followingFrame - the value for the followingFrame record component
  • Method Details

    • locate

      public MovementCorrectionTiming.Placement locate(long oldestFrame, long completedFrame)
      The receiver queues into the following snapshot, capped at the newest retained snapshot.
    • locateMotion

      public MovementCorrectionTiming.Placement locateMotion(long oldestFrame, long completedFrame)
      Explicit velocity commands clamp old clocks to the oldest retained native input.
    • 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. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      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.
    • serverTick

      public long serverTick()
      Returns the value of the serverTick record component.
      Returns:
      the value of the serverTick record component
    • inputTick

      public long inputTick()
      Returns the value of the inputTick record component.
      Returns:
      the value of the inputTick record component
    • inputFrame

      public long inputFrame()
      Returns the value of the inputFrame record component.
      Returns:
      the value of the inputFrame record component
    • historyStartTick

      public long historyStartTick()
      Returns the value of the historyStartTick record component.
      Returns:
      the value of the historyStartTick record component
    • followingFrame

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