Class AssetInfo

java.lang.Object
com.hypixel.hytale.protocol.packets.asseteditor.AssetInfo

public class AssetInfo 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:
    • path

      @Nullable public AssetPath path
    • oldPath

      @Nullable public AssetPath oldPath
    • isDeleted

      public boolean isDeleted
    • isNew

      public boolean isNew
    • lastModificationDate

      public long lastModificationDate
    • lastModificationUsername

      @Nullable public String lastModificationUsername
  • Constructor Details

    • AssetInfo

      public AssetInfo()
    • AssetInfo

      public AssetInfo(@Nullable AssetPath path, @Nullable AssetPath oldPath, boolean isDeleted, boolean isNew, long lastModificationDate, @Nullable String lastModificationUsername)
    • AssetInfo

      public AssetInfo(@Nonnull AssetInfo 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.
    • getPath

      @Nullable public static AssetPath getPath(MemorySegment mem)
    • getPath

      @Nullable public static AssetPath getPath(MemorySegment mem, int offset)
    • getOldPath

      @Nullable public static AssetPath getOldPath(MemorySegment mem)
    • getOldPath

      @Nullable public static AssetPath getOldPath(MemorySegment mem, int offset)
    • getIsDeleted

      public static boolean getIsDeleted(MemorySegment mem)
    • getIsDeleted

      public static boolean getIsDeleted(MemorySegment mem, int offset)
    • getIsNew

      public static boolean getIsNew(MemorySegment mem)
    • getIsNew

      public static boolean getIsNew(MemorySegment mem, int offset)
    • getLastModificationDate

      public static long getLastModificationDate(MemorySegment mem)
    • getLastModificationDate

      public static long getLastModificationDate(MemorySegment mem, int offset)
    • getLastModificationUsername

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

      @Nullable public static String getLastModificationUsername(MemorySegment mem, int offset)
    • hasPath

      public static boolean hasPath(MemorySegment mem, int offset)
    • hasOldPath

      public static boolean hasOldPath(MemorySegment mem, int offset)
    • hasLastModificationUsername

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

      public static AssetInfo toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object