Class StingerBinding

java.lang.Object
com.hypixel.hytale.protocol.StingerBinding

public class StingerBinding 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:
    • musicEvent

      @Nullable public String musicEvent
    • stingerIndex

      public int stingerIndex
    • playAt

      @Nullable public MusicSync playAt
    • minRepeatIntervalSeconds

      public float minRepeatIntervalSeconds
    • shortLead

      @Nonnull public StingerShortLead shortLead
  • Constructor Details

    • StingerBinding

      public StingerBinding()
    • StingerBinding

      public StingerBinding(@Nullable String musicEvent, int stingerIndex, @Nullable MusicSync playAt, float minRepeatIntervalSeconds, @Nonnull StingerShortLead shortLead)
    • StingerBinding

      public StingerBinding(@Nonnull StingerBinding 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.
    • getMusicEvent

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

      @Nullable public static String getMusicEvent(MemorySegment mem, int offset)
    • getStingerIndex

      public static int getStingerIndex(MemorySegment mem)
    • getStingerIndex

      public static int getStingerIndex(MemorySegment mem, int offset)
    • getPlayAt

      @Nullable public static MusicSync getPlayAt(MemorySegment mem)
    • getPlayAt

      @Nullable public static MusicSync getPlayAt(MemorySegment mem, int offset)
    • getMinRepeatIntervalSeconds

      public static float getMinRepeatIntervalSeconds(MemorySegment mem)
    • getMinRepeatIntervalSeconds

      public static float getMinRepeatIntervalSeconds(MemorySegment mem, int offset)
    • getShortLead

      public static StingerShortLead getShortLead(MemorySegment mem)
    • getShortLead

      public static StingerShortLead getShortLead(MemorySegment mem, int offset)
    • hasMusicEvent

      public static boolean hasMusicEvent(MemorySegment mem, int offset)
    • hasPlayAt

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

      public static StingerBinding toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object