Class BuilderToolOnUseInteraction

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

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

    • PACKET_ID

      public static final int PACKET_ID
      See Also:
    • IS_COMPRESSED

      public static final boolean IS_COMPRESSED
      See Also:
    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • type

      @Nonnull public InteractionType type
    • x

      public int x
    • y

      public int y
    • z

      public int z
    • offsetForPaintModeX

      public int offsetForPaintModeX
    • offsetForPaintModeY

      public int offsetForPaintModeY
    • offsetForPaintModeZ

      public int offsetForPaintModeZ
    • isAltPlaySculptBrushModDown

      public boolean isAltPlaySculptBrushModDown
    • isHoldDownInteraction

      public boolean isHoldDownInteraction
    • isDoServerRaytraceForPosition

      public boolean isDoServerRaytraceForPosition
    • maxLengthToolIgnoreHistory

      public int maxLengthToolIgnoreHistory
    • raycastOriginX

      public float raycastOriginX
    • raycastOriginY

      public float raycastOriginY
    • raycastOriginZ

      public float raycastOriginZ
    • raycastDirectionX

      public float raycastDirectionX
    • raycastDirectionY

      public float raycastDirectionY
    • raycastDirectionZ

      public float raycastDirectionZ
    • undoGroupSize

      public int undoGroupSize
  • Constructor Details

    • BuilderToolOnUseInteraction

      public BuilderToolOnUseInteraction()
    • BuilderToolOnUseInteraction

      public BuilderToolOnUseInteraction(@Nonnull InteractionType type, int x, int y, int z, int offsetForPaintModeX, int offsetForPaintModeY, int offsetForPaintModeZ, boolean isAltPlaySculptBrushModDown, boolean isHoldDownInteraction, boolean isDoServerRaytraceForPosition, int maxLengthToolIgnoreHistory, float raycastOriginX, float raycastOriginY, float raycastOriginZ, float raycastDirectionX, float raycastDirectionY, float raycastDirectionZ, int undoGroupSize)
    • BuilderToolOnUseInteraction

      public BuilderToolOnUseInteraction(@Nonnull BuilderToolOnUseInteraction other)
  • 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.
    • getType

      public static InteractionType getType(MemorySegment mem)
    • getType

      public static InteractionType getType(MemorySegment mem, int offset)
    • getX

      public static int getX(MemorySegment mem)
    • getX

      public static int getX(MemorySegment mem, int offset)
    • getY

      public static int getY(MemorySegment mem)
    • getY

      public static int getY(MemorySegment mem, int offset)
    • getZ

      public static int getZ(MemorySegment mem)
    • getZ

      public static int getZ(MemorySegment mem, int offset)
    • getOffsetForPaintModeX

      public static int getOffsetForPaintModeX(MemorySegment mem)
    • getOffsetForPaintModeX

      public static int getOffsetForPaintModeX(MemorySegment mem, int offset)
    • getOffsetForPaintModeY

      public static int getOffsetForPaintModeY(MemorySegment mem)
    • getOffsetForPaintModeY

      public static int getOffsetForPaintModeY(MemorySegment mem, int offset)
    • getOffsetForPaintModeZ

      public static int getOffsetForPaintModeZ(MemorySegment mem)
    • getOffsetForPaintModeZ

      public static int getOffsetForPaintModeZ(MemorySegment mem, int offset)
    • getIsAltPlaySculptBrushModDown

      public static boolean getIsAltPlaySculptBrushModDown(MemorySegment mem)
    • getIsAltPlaySculptBrushModDown

      public static boolean getIsAltPlaySculptBrushModDown(MemorySegment mem, int offset)
    • getIsHoldDownInteraction

      public static boolean getIsHoldDownInteraction(MemorySegment mem)
    • getIsHoldDownInteraction

      public static boolean getIsHoldDownInteraction(MemorySegment mem, int offset)
    • getIsDoServerRaytraceForPosition

      public static boolean getIsDoServerRaytraceForPosition(MemorySegment mem)
    • getIsDoServerRaytraceForPosition

      public static boolean getIsDoServerRaytraceForPosition(MemorySegment mem, int offset)
    • getMaxLengthToolIgnoreHistory

      public static int getMaxLengthToolIgnoreHistory(MemorySegment mem)
    • getMaxLengthToolIgnoreHistory

      public static int getMaxLengthToolIgnoreHistory(MemorySegment mem, int offset)
    • getRaycastOriginX

      public static float getRaycastOriginX(MemorySegment mem)
    • getRaycastOriginX

      public static float getRaycastOriginX(MemorySegment mem, int offset)
    • getRaycastOriginY

      public static float getRaycastOriginY(MemorySegment mem)
    • getRaycastOriginY

      public static float getRaycastOriginY(MemorySegment mem, int offset)
    • getRaycastOriginZ

      public static float getRaycastOriginZ(MemorySegment mem)
    • getRaycastOriginZ

      public static float getRaycastOriginZ(MemorySegment mem, int offset)
    • getRaycastDirectionX

      public static float getRaycastDirectionX(MemorySegment mem)
    • getRaycastDirectionX

      public static float getRaycastDirectionX(MemorySegment mem, int offset)
    • getRaycastDirectionY

      public static float getRaycastDirectionY(MemorySegment mem)
    • getRaycastDirectionY

      public static float getRaycastDirectionY(MemorySegment mem, int offset)
    • getRaycastDirectionZ

      public static float getRaycastDirectionZ(MemorySegment mem)
    • getRaycastDirectionZ

      public static float getRaycastDirectionZ(MemorySegment mem, int offset)
    • getUndoGroupSize

      public static int getUndoGroupSize(MemorySegment mem)
    • getUndoGroupSize

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

      public static BuilderToolOnUseInteraction toObject(MemorySegment mem)
    • toObject

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

      public static BuilderToolOnUseInteraction toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one BuilderToolOnUseInteraction 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

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object