Class OpenPortalActivePage

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

public class OpenPortalActivePage 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
    • timeLimitSeconds

      public int timeLimitSeconds
    • remainingSeconds

      public int remainingSeconds
    • timerStarted

      public boolean timerStarted
    • allowedEntryCount

      public int allowedEntryCount
    • entriesUsed

      public int entriesUsed
    • anyoneEntered

      public boolean anyoneEntered
    • playerCount

      public int playerCount
    • playerNames

      @Nullable public String[] playerNames
    • isForming

      public boolean isForming
  • Constructor Details

    • OpenPortalActivePage

      public OpenPortalActivePage()
    • OpenPortalActivePage

      public OpenPortalActivePage(int promptId, @Nullable String nameKey, int timeLimitSeconds, int remainingSeconds, boolean timerStarted, int allowedEntryCount, int entriesUsed, boolean anyoneEntered, int playerCount, @Nullable String[] playerNames, boolean isForming)
    • OpenPortalActivePage

      public OpenPortalActivePage(@Nonnull OpenPortalActivePage 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)
    • getTimeLimitSeconds

      public static int getTimeLimitSeconds(MemorySegment mem)
    • getTimeLimitSeconds

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

      public static int getRemainingSeconds(MemorySegment mem)
    • getRemainingSeconds

      public static int getRemainingSeconds(MemorySegment mem, int offset)
    • getTimerStarted

      public static boolean getTimerStarted(MemorySegment mem)
    • getTimerStarted

      public static boolean getTimerStarted(MemorySegment mem, int offset)
    • getAllowedEntryCount

      public static int getAllowedEntryCount(MemorySegment mem)
    • getAllowedEntryCount

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

      public static int getEntriesUsed(MemorySegment mem)
    • getEntriesUsed

      public static int getEntriesUsed(MemorySegment mem, int offset)
    • getAnyoneEntered

      public static boolean getAnyoneEntered(MemorySegment mem)
    • getAnyoneEntered

      public static boolean getAnyoneEntered(MemorySegment mem, int offset)
    • getPlayerCount

      public static int getPlayerCount(MemorySegment mem)
    • getPlayerCount

      public static int getPlayerCount(MemorySegment mem, int offset)
    • getPlayerNames

      @Nullable public static String[] getPlayerNames(MemorySegment mem)
    • getPlayerNames

      @Nullable public static String[] getPlayerNames(MemorySegment mem, int offset)
    • getIsForming

      public static boolean getIsForming(MemorySegment mem)
    • getIsForming

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

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

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

      public static OpenPortalActivePage toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object