Class AssetEditorAssetListSetup

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

public class AssetEditorAssetListSetup extends Object implements Packet, ToClientPacket
  • Field Details

  • Constructor Details

    • AssetEditorAssetListSetup

      public AssetEditorAssetListSetup()
    • AssetEditorAssetListSetup

      public AssetEditorAssetListSetup(@Nullable String pack, boolean isReadOnly, boolean canBeDeleted, @Nonnull AssetEditorFileTree tree, @Nullable AssetEditorFileEntry[] paths)
    • AssetEditorAssetListSetup

      public AssetEditorAssetListSetup(@Nonnull AssetEditorAssetListSetup 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.
    • getPack

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

      @Nullable public static String getPack(MemorySegment mem, int offset)
    • getIsReadOnly

      public static boolean getIsReadOnly(MemorySegment mem)
    • getIsReadOnly

      public static boolean getIsReadOnly(MemorySegment mem, int offset)
    • getCanBeDeleted

      public static boolean getCanBeDeleted(MemorySegment mem)
    • getCanBeDeleted

      public static boolean getCanBeDeleted(MemorySegment mem, int offset)
    • getTree

      public static AssetEditorFileTree getTree(MemorySegment mem)
    • getTree

      public static AssetEditorFileTree getTree(MemorySegment mem, int offset)
    • getPaths

      @Nullable public static AssetEditorFileEntry[] getPaths(MemorySegment mem)
    • getPaths

      @Nullable public static AssetEditorFileEntry[] getPaths(MemorySegment mem, int offset)
    • hasPack

      public static boolean hasPack(MemorySegment mem, int offset)
    • hasPaths

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

      public static AssetEditorAssetListSetup toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object