Class BuilderToolColorAction

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

public class BuilderToolColorAction 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:
    • mode

      @Nonnull public ColorToolMode mode
    • x

      public int x
    • y

      public int y
    • z

      public int z
    • gradientStartX

      public int gradientStartX
    • gradientStartY

      public int gradientStartY
    • gradientStartZ

      public int gradientStartZ
    • gradientEndX

      public int gradientEndX
    • gradientEndY

      public int gradientEndY
    • gradientEndZ

      public int gradientEndZ
    • gradientMaterials

      @Nullable public String gradientMaterials
    • gradientShape

      @Nullable public String gradientShape
    • playerX

      public float playerX
    • playerY

      public float playerY
    • playerZ

      public float playerZ
    • shadingLighten

      public boolean shadingLighten
    • isHoldDownInteraction

      public boolean isHoldDownInteraction
    • undoGroupSize

      public int undoGroupSize
  • Constructor Details

    • BuilderToolColorAction

      public BuilderToolColorAction()
    • BuilderToolColorAction

      public BuilderToolColorAction(@Nonnull ColorToolMode mode, int x, int y, int z, int gradientStartX, int gradientStartY, int gradientStartZ, int gradientEndX, int gradientEndY, int gradientEndZ, @Nullable String gradientMaterials, @Nullable String gradientShape, float playerX, float playerY, float playerZ, boolean shadingLighten, boolean isHoldDownInteraction, int undoGroupSize)
    • BuilderToolColorAction

      public BuilderToolColorAction(@Nonnull BuilderToolColorAction 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.
    • getMode

      public static ColorToolMode getMode(MemorySegment mem)
    • getMode

      public static ColorToolMode getMode(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)
    • getGradientStartX

      public static int getGradientStartX(MemorySegment mem)
    • getGradientStartX

      public static int getGradientStartX(MemorySegment mem, int offset)
    • getGradientStartY

      public static int getGradientStartY(MemorySegment mem)
    • getGradientStartY

      public static int getGradientStartY(MemorySegment mem, int offset)
    • getGradientStartZ

      public static int getGradientStartZ(MemorySegment mem)
    • getGradientStartZ

      public static int getGradientStartZ(MemorySegment mem, int offset)
    • getGradientEndX

      public static int getGradientEndX(MemorySegment mem)
    • getGradientEndX

      public static int getGradientEndX(MemorySegment mem, int offset)
    • getGradientEndY

      public static int getGradientEndY(MemorySegment mem)
    • getGradientEndY

      public static int getGradientEndY(MemorySegment mem, int offset)
    • getGradientEndZ

      public static int getGradientEndZ(MemorySegment mem)
    • getGradientEndZ

      public static int getGradientEndZ(MemorySegment mem, int offset)
    • getGradientMaterials

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

      @Nullable public static String getGradientMaterials(MemorySegment mem, int offset)
    • getGradientShape

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

      @Nullable public static String getGradientShape(MemorySegment mem, int offset)
    • getPlayerX

      public static float getPlayerX(MemorySegment mem)
    • getPlayerX

      public static float getPlayerX(MemorySegment mem, int offset)
    • getPlayerY

      public static float getPlayerY(MemorySegment mem)
    • getPlayerY

      public static float getPlayerY(MemorySegment mem, int offset)
    • getPlayerZ

      public static float getPlayerZ(MemorySegment mem)
    • getPlayerZ

      public static float getPlayerZ(MemorySegment mem, int offset)
    • getShadingLighten

      public static boolean getShadingLighten(MemorySegment mem)
    • getShadingLighten

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

      public static boolean getIsHoldDownInteraction(MemorySegment mem)
    • getIsHoldDownInteraction

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

      public static int getUndoGroupSize(MemorySegment mem)
    • getUndoGroupSize

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

      public static boolean hasGradientMaterials(MemorySegment mem, int offset)
    • hasGradientShape

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

      public static BuilderToolColorAction toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object