Class BuilderToolSelectionTransform

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

public class BuilderToolSelectionTransform 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:
    • rotation

      @Nullable public org.joml.Quaternionfc rotation
    • translationOffset

      @Nullable public BlockPosition translationOffset
    • initialSelectionMin

      @Nullable public BlockPosition initialSelectionMin
    • initialSelectionMax

      @Nullable public BlockPosition initialSelectionMax
    • initialRotationOrigin

      @Nonnull public org.joml.Vector3fc initialRotationOrigin
    • cutOriginal

      public boolean cutOriginal
    • applyTransformationToSelectionMinMax

      public boolean applyTransformationToSelectionMinMax
    • isExitingTransformMode

      public boolean isExitingTransformMode
    • initialPastePointForClipboardPaste

      @Nullable public BlockPosition initialPastePointForClipboardPaste
  • Constructor Details

    • BuilderToolSelectionTransform

      public BuilderToolSelectionTransform()
    • BuilderToolSelectionTransform

      public BuilderToolSelectionTransform(@Nullable org.joml.Quaternionfc rotation, @Nullable BlockPosition translationOffset, @Nullable BlockPosition initialSelectionMin, @Nullable BlockPosition initialSelectionMax, @Nonnull org.joml.Vector3fc initialRotationOrigin, boolean cutOriginal, boolean applyTransformationToSelectionMinMax, boolean isExitingTransformMode, @Nullable BlockPosition initialPastePointForClipboardPaste)
    • BuilderToolSelectionTransform

      public BuilderToolSelectionTransform(@Nonnull BuilderToolSelectionTransform 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.
    • getRotation

      @Nullable public static org.joml.Quaternionfc getRotation(MemorySegment mem)
    • getRotation

      @Nullable public static org.joml.Quaternionfc getRotation(MemorySegment mem, int offset)
    • getTranslationOffset

      @Nullable public static BlockPosition getTranslationOffset(MemorySegment mem)
    • getTranslationOffset

      @Nullable public static BlockPosition getTranslationOffset(MemorySegment mem, int offset)
    • getInitialSelectionMin

      @Nullable public static BlockPosition getInitialSelectionMin(MemorySegment mem)
    • getInitialSelectionMin

      @Nullable public static BlockPosition getInitialSelectionMin(MemorySegment mem, int offset)
    • getInitialSelectionMax

      @Nullable public static BlockPosition getInitialSelectionMax(MemorySegment mem)
    • getInitialSelectionMax

      @Nullable public static BlockPosition getInitialSelectionMax(MemorySegment mem, int offset)
    • getInitialRotationOrigin

      public static org.joml.Vector3fc getInitialRotationOrigin(MemorySegment mem)
    • getInitialRotationOrigin

      public static org.joml.Vector3fc getInitialRotationOrigin(MemorySegment mem, int offset)
    • getCutOriginal

      public static boolean getCutOriginal(MemorySegment mem)
    • getCutOriginal

      public static boolean getCutOriginal(MemorySegment mem, int offset)
    • getApplyTransformationToSelectionMinMax

      public static boolean getApplyTransformationToSelectionMinMax(MemorySegment mem)
    • getApplyTransformationToSelectionMinMax

      public static boolean getApplyTransformationToSelectionMinMax(MemorySegment mem, int offset)
    • getIsExitingTransformMode

      public static boolean getIsExitingTransformMode(MemorySegment mem)
    • getIsExitingTransformMode

      public static boolean getIsExitingTransformMode(MemorySegment mem, int offset)
    • getInitialPastePointForClipboardPaste

      @Nullable public static BlockPosition getInitialPastePointForClipboardPaste(MemorySegment mem)
    • getInitialPastePointForClipboardPaste

      @Nullable public static BlockPosition getInitialPastePointForClipboardPaste(MemorySegment mem, int offset)
    • hasRotation

      public static boolean hasRotation(MemorySegment mem, int offset)
    • hasTranslationOffset

      public static boolean hasTranslationOffset(MemorySegment mem, int offset)
    • hasInitialSelectionMin

      public static boolean hasInitialSelectionMin(MemorySegment mem, int offset)
    • hasInitialSelectionMax

      public static boolean hasInitialSelectionMax(MemorySegment mem, int offset)
    • hasInitialPastePointForClipboardPaste

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

      public static BuilderToolSelectionTransform toObject(MemorySegment mem)
    • toObject

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

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