Class ClipboardEntityChange

java.lang.Object
com.hypixel.hytale.protocol.packets.buildertools.ClipboardEntityChange

public class ClipboardEntityChange extends Object
  • Field Details

    • 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:
    • x

      public float x
    • y

      public float y
    • z

      public float z
    • blockId

      public int blockId
    • model

      @Nullable public Model model
    • itemId

      @Nullable public String itemId
    • bodyOrientation

      @Nullable public Direction bodyOrientation
    • lookOrientation

      @Nullable public Direction lookOrientation
    • scale

      public float scale
  • Constructor Details

    • ClipboardEntityChange

      public ClipboardEntityChange()
    • ClipboardEntityChange

      public ClipboardEntityChange(float x, float y, float z, int blockId, @Nullable Model model, @Nullable String itemId, @Nullable Direction bodyOrientation, @Nullable Direction lookOrientation, float scale)
    • ClipboardEntityChange

      public ClipboardEntityChange(@Nonnull ClipboardEntityChange other)
  • Method Details

    • 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.
    • getX

      public static float getX(MemorySegment mem)
    • getX

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

      public static float getY(MemorySegment mem)
    • getY

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

      public static float getZ(MemorySegment mem)
    • getZ

      public static float getZ(MemorySegment mem, int offset)
    • getBlockId

      public static int getBlockId(MemorySegment mem)
    • getBlockId

      public static int getBlockId(MemorySegment mem, int offset)
    • getModel

      @Nullable public static Model getModel(MemorySegment mem)
    • getModel

      @Nullable public static Model getModel(MemorySegment mem, int offset)
    • getItemId

      @Nullable public static String getItemId(MemorySegment mem)
    • getItemId

      @Nullable public static String getItemId(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)
    • getScale

      public static float getScale(MemorySegment mem)
    • getScale

      public static float getScale(MemorySegment mem, int offset)
    • hasBodyOrientation

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

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

      public static boolean hasModel(MemorySegment mem, int offset)
    • hasItemId

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

      public static ClipboardEntityChange toObject(MemorySegment mem)
    • toObject

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

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

      public int computeSize()
    • clone

      public ClipboardEntityChange clone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object