Class EditorBlocksChange

java.lang.Object
com.hypixel.hytale.protocol.packets.interface_.EditorBlocksChange
All Implemented Interfaces:
Packet, ToClientPacket

public class EditorBlocksChange extends Object implements Packet, ToClientPacket
  • 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:
    • selection

      @Nullable public EditorSelection selection
    • blocksChange

      @Nullable public BlockChange[] blocksChange
    • fluidsChange

      @Nullable public FluidChange[] fluidsChange
    • entityChanges

      @Nullable public ClipboardEntityChange[] entityChanges
    • blocksCount

      public int blocksCount
    • advancedPreview

      public boolean advancedPreview
    • skipPreviewRebuild

      public boolean skipPreviewRebuild
    • cumulativeRotX

      @Nullable public Integer cumulativeRotX
    • cumulativeRotY

      @Nullable public Integer cumulativeRotY
    • cumulativeRotZ

      @Nullable public Integer cumulativeRotZ
    • blocksOmitted

      public boolean blocksOmitted
    • anchorBounds

      @Nullable public EditorSelection anchorBounds
    • shapeOccupancy

      @Nullable public byte[] shapeOccupancy
  • Constructor Details

    • EditorBlocksChange

      public EditorBlocksChange()
    • EditorBlocksChange

      public EditorBlocksChange(@Nullable EditorSelection selection, @Nullable BlockChange[] blocksChange, @Nullable FluidChange[] fluidsChange, @Nullable ClipboardEntityChange[] entityChanges, int blocksCount, boolean advancedPreview, boolean skipPreviewRebuild, @Nullable Integer cumulativeRotX, @Nullable Integer cumulativeRotY, @Nullable Integer cumulativeRotZ, boolean blocksOmitted, @Nullable EditorSelection anchorBounds, @Nullable byte[] shapeOccupancy)
    • EditorBlocksChange

      public EditorBlocksChange(@Nonnull EditorBlocksChange 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.
    • getSelection

      @Nullable public static EditorSelection getSelection(MemorySegment mem)
    • getSelection

      @Nullable public static EditorSelection getSelection(MemorySegment mem, int offset)
    • getBlocksChange

      @Nullable public static BlockChange[] getBlocksChange(MemorySegment mem)
    • getBlocksChange

      @Nullable public static BlockChange[] getBlocksChange(MemorySegment mem, int offset)
    • getFluidsChange

      @Nullable public static FluidChange[] getFluidsChange(MemorySegment mem)
    • getFluidsChange

      @Nullable public static FluidChange[] getFluidsChange(MemorySegment mem, int offset)
    • getEntityChanges

      @Nullable public static ClipboardEntityChange[] getEntityChanges(MemorySegment mem)
    • getEntityChanges

      @Nullable public static ClipboardEntityChange[] getEntityChanges(MemorySegment mem, int offset)
    • getBlocksCount

      public static int getBlocksCount(MemorySegment mem)
    • getBlocksCount

      public static int getBlocksCount(MemorySegment mem, int offset)
    • getAdvancedPreview

      public static boolean getAdvancedPreview(MemorySegment mem)
    • getAdvancedPreview

      public static boolean getAdvancedPreview(MemorySegment mem, int offset)
    • getSkipPreviewRebuild

      public static boolean getSkipPreviewRebuild(MemorySegment mem)
    • getSkipPreviewRebuild

      public static boolean getSkipPreviewRebuild(MemorySegment mem, int offset)
    • getCumulativeRotX

      @Nullable public static Integer getCumulativeRotX(MemorySegment mem)
    • getCumulativeRotX

      @Nullable public static Integer getCumulativeRotX(MemorySegment mem, int offset)
    • getCumulativeRotY

      @Nullable public static Integer getCumulativeRotY(MemorySegment mem)
    • getCumulativeRotY

      @Nullable public static Integer getCumulativeRotY(MemorySegment mem, int offset)
    • getCumulativeRotZ

      @Nullable public static Integer getCumulativeRotZ(MemorySegment mem)
    • getCumulativeRotZ

      @Nullable public static Integer getCumulativeRotZ(MemorySegment mem, int offset)
    • getBlocksOmitted

      public static boolean getBlocksOmitted(MemorySegment mem)
    • getBlocksOmitted

      public static boolean getBlocksOmitted(MemorySegment mem, int offset)
    • getAnchorBounds

      @Nullable public static EditorSelection getAnchorBounds(MemorySegment mem)
    • getAnchorBounds

      @Nullable public static EditorSelection getAnchorBounds(MemorySegment mem, int offset)
    • getShapeOccupancy

      @Nullable public static byte[] getShapeOccupancy(MemorySegment mem)
    • getShapeOccupancy

      @Nullable public static byte[] getShapeOccupancy(MemorySegment mem, int offset)
    • hasSelection

      public static boolean hasSelection(MemorySegment mem, int offset)
    • hasCumulativeRotX

      public static boolean hasCumulativeRotX(MemorySegment mem, int offset)
    • hasCumulativeRotY

      public static boolean hasCumulativeRotY(MemorySegment mem, int offset)
    • hasCumulativeRotZ

      public static boolean hasCumulativeRotZ(MemorySegment mem, int offset)
    • hasAnchorBounds

      public static boolean hasAnchorBounds(MemorySegment mem, int offset)
    • hasBlocksChange

      public static boolean hasBlocksChange(MemorySegment mem, int offset)
    • hasFluidsChange

      public static boolean hasFluidsChange(MemorySegment mem, int offset)
    • hasEntityChanges

      public static boolean hasEntityChanges(MemorySegment mem, int offset)
    • hasShapeOccupancy

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

      public static EditorBlocksChange toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object