Class OpenPortalSummonPage

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

public class OpenPortalSummonPage 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:
    • promptId

      public int promptId
    • nameKey

      @Nullable public String nameKey
    • loreKey

      @Nullable public String loreKey
    • timeLimitSeconds

      public int timeLimitSeconds
    • bonusSeconds

      public int bonusSeconds
    • allowedEntryCount

      public int allowedEntryCount
    • keyItemId

      @Nullable public String keyItemId
    • keysHeld

      public int keysHeld
    • keysRequired

      public int keysRequired
  • Constructor Details

    • OpenPortalSummonPage

      public OpenPortalSummonPage()
    • OpenPortalSummonPage

      public OpenPortalSummonPage(int promptId, @Nullable String nameKey, @Nullable String loreKey, int timeLimitSeconds, int bonusSeconds, int allowedEntryCount, @Nullable String keyItemId, int keysHeld, int keysRequired)
    • OpenPortalSummonPage

      public OpenPortalSummonPage(@Nonnull OpenPortalSummonPage 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.
    • getPromptId

      public static int getPromptId(MemorySegment mem)
    • getPromptId

      public static int getPromptId(MemorySegment mem, int offset)
    • getNameKey

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

      @Nullable public static String getNameKey(MemorySegment mem, int offset)
    • getLoreKey

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

      @Nullable public static String getLoreKey(MemorySegment mem, int offset)
    • getTimeLimitSeconds

      public static int getTimeLimitSeconds(MemorySegment mem)
    • getTimeLimitSeconds

      public static int getTimeLimitSeconds(MemorySegment mem, int offset)
    • getBonusSeconds

      public static int getBonusSeconds(MemorySegment mem)
    • getBonusSeconds

      public static int getBonusSeconds(MemorySegment mem, int offset)
    • getAllowedEntryCount

      public static int getAllowedEntryCount(MemorySegment mem)
    • getAllowedEntryCount

      public static int getAllowedEntryCount(MemorySegment mem, int offset)
    • getKeyItemId

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

      @Nullable public static String getKeyItemId(MemorySegment mem, int offset)
    • getKeysHeld

      public static int getKeysHeld(MemorySegment mem)
    • getKeysHeld

      public static int getKeysHeld(MemorySegment mem, int offset)
    • getKeysRequired

      public static int getKeysRequired(MemorySegment mem)
    • getKeysRequired

      public static int getKeysRequired(MemorySegment mem, int offset)
    • hasNameKey

      public static boolean hasNameKey(MemorySegment mem, int offset)
    • hasLoreKey

      public static boolean hasLoreKey(MemorySegment mem, int offset)
    • hasKeyItemId

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

      public static OpenPortalSummonPage toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object