Record Class VecDelta.Linear

java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.VecDelta.Linear
All Implemented Interfaces:
VecDelta
Enclosing interface:
VecDelta

public static record VecDelta.Linear(short xa, short ya, short za) extends Record implements VecDelta
  • Nested Class Summary

    Nested classes/interfaces inherited from interface VecDelta

    VecDelta.Linear, VecDelta.Stepped
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final short
    The field for the xa record component.
    private final short
    The field for the ya record component.
    private final short
    The field for the za record component.

    Fields inherited from interface VecDelta

    ZERO
  • Constructor Summary

    Constructors
    Constructor
    Description
    Linear(short xa, short ya, short za)
    Creates an instance of a Linear record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(VecDeltaCodec positionCodec)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
     
    boolean
     
    final int
    Returns a hash code value for this object.
    int
     
    final String
    Returns a string representation of this record class.
    short
    xa()
    Returns the value of the xa record component.
    short
    ya()
    Returns the value of the ya record component.
    short
    za()
    Returns the value of the za record component.

    Methods inherited from class Object

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

    • xa

      private final short xa
      The field for the xa record component.
    • ya

      private final short ya
      The field for the ya record component.
    • za

      private final short za
      The field for the za record component.
  • Constructor Details

    • Linear

      public Linear(short xa, short ya, short za)
      Creates an instance of a Linear record class.
      Parameters:
      xa - the value for the xa record component
      ya - the value for the ya record component
      za - the value for the za record component
  • Method Details

    • stepCount

      public int stepCount()
      Specified by:
      stepCount in interface VecDelta
    • hasDeltaX

      public boolean hasDeltaX()
      Specified by:
      hasDeltaX in interface VecDelta
    • hasDeltaZ

      public boolean hasDeltaZ()
      Specified by:
      hasDeltaZ in interface VecDelta
    • decode

      public PositionPath decode(VecDeltaCodec positionCodec)
      Specified by:
      decode in interface VecDelta
    • 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.
    • xa

      public short xa()
      Returns the value of the xa record component.
      Returns:
      the value of the xa record component
    • ya

      public short ya()
      Returns the value of the ya record component.
      Returns:
      the value of the ya record component
    • za

      public short za()
      Returns the value of the za record component.
      Returns:
      the value of the za record component