Class ClientMovement

java.lang.Object
com.hypixel.hytale.protocol.packets.player.ClientMovement
All Implemented Interfaces:
Packet, ToServerPacket

public class ClientMovement extends Object implements Packet, ToServerPacket
  • Field Details

  • Constructor Details

  • Method Details

    • getId

      public int getId()
      Description copied from interface: Packet
      Returns the unique packet ID.
      Specified by:
      getId in interface Packet
    • getChannel

      public NetworkChannel getChannel()
      Description copied from interface: Packet
      Returns the channel this packet should be sent on.
      Specified by:
      getChannel in interface Packet
    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getMovementStates

      @Nullable public static MovementStates getMovementStates(MemorySegment mem)
    • getMovementStates

      @Nullable public static MovementStates getMovementStates(MemorySegment mem, int offset)
    • getRelativePosition

      @Nullable public static HalfFloatPosition getRelativePosition(MemorySegment mem)
    • getRelativePosition

      @Nullable public static HalfFloatPosition getRelativePosition(MemorySegment mem, int offset)
    • getAbsolutePosition

      @Nullable public static Position getAbsolutePosition(MemorySegment mem)
    • getAbsolutePosition

      @Nullable public static Position getAbsolutePosition(MemorySegment mem, int offset)
    • getBodyOrientation

      @Nullable public static Direction getBodyOrientation(MemorySegment mem)
    • getBodyOrientation

      @Nullable public static Direction getBodyOrientation(MemorySegment mem, int offset)
    • getLookOrientation

      @Nullable public static Direction getLookOrientation(MemorySegment mem)
    • getLookOrientation

      @Nullable public static Direction getLookOrientation(MemorySegment mem, int offset)
    • getTeleportAck

      @Nullable public static TeleportAck getTeleportAck(MemorySegment mem)
    • getTeleportAck

      @Nullable public static TeleportAck getTeleportAck(MemorySegment mem, int offset)
    • getWishMovement

      @Nullable public static Position getWishMovement(MemorySegment mem)
    • getWishMovement

      @Nullable public static Position getWishMovement(MemorySegment mem, int offset)
    • getVelocity

      @Nullable public static Vector3d getVelocity(MemorySegment mem)
    • getVelocity

      @Nullable public static Vector3d getVelocity(MemorySegment mem, int offset)
    • getMountedTo

      public static int getMountedTo(MemorySegment mem)
    • getMountedTo

      public static int getMountedTo(MemorySegment mem, int offset)
    • getRiderMovementStates

      @Nullable public static MovementStates getRiderMovementStates(MemorySegment mem)
    • getRiderMovementStates

      @Nullable public static MovementStates getRiderMovementStates(MemorySegment mem, int offset)
    • hasMovementStates

      public static boolean hasMovementStates(MemorySegment mem, int offset)
    • hasRelativePosition

      public static boolean hasRelativePosition(MemorySegment mem, int offset)
    • hasAbsolutePosition

      public static boolean hasAbsolutePosition(MemorySegment mem, int offset)
    • hasBodyOrientation

      public static boolean hasBodyOrientation(MemorySegment mem, int offset)
    • hasLookOrientation

      public static boolean hasLookOrientation(MemorySegment mem, int offset)
    • hasTeleportAck

      public static boolean hasTeleportAck(MemorySegment mem, int offset)
    • hasWishMovement

      public static boolean hasWishMovement(MemorySegment mem, int offset)
    • hasVelocity

      public static boolean hasVelocity(MemorySegment mem, int offset)
    • hasRiderMovementStates

      public static boolean hasRiderMovementStates(MemorySegment mem, int offset)
    • toObject

      public static ClientMovement toObject(MemorySegment mem)
    • toObject

      public static ClientMovement toObject(MemorySegment mem, int offset)
    • toObject

      public static ClientMovement toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one ClientMovement and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
      Description copied from interface: Packet
      Writes this packet at offset and returns the number of bytes written, which callers rely on being exactly Packet.computeSize(). The framed write path reserves and length-prefixes on that figure before serializing, so a shorter or longer write corrupts the frame rather than failing.
      Specified by:
      serialize in interface Packet
    • computeSize

      public int computeSize()
      Description copied from interface: Packet
      Compute the exact number of bytes needed to serialize this packet.
      Specified by:
      computeSize in interface Packet
    • clone

      public ClientMovement clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object