Class SoundEventLayer

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

public class SoundEventLayer 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:
    • volume

      public float volume
    • startDelay

      public float startDelay
    • fadeIn

      public float fadeIn
    • looping

      public boolean looping
    • probability

      public int probability
    • probabilityRerollDelay

      public float probabilityRerollDelay
    • roundRobinHistorySize

      public int roundRobinHistorySize
    • randomSettings

      @Nonnull public SoundEventLayerRandomSettings randomSettings
    • files

      @Nonnull public String[] files
  • Constructor Details

    • SoundEventLayer

      public SoundEventLayer()
    • SoundEventLayer

      public SoundEventLayer(float volume, float startDelay, float fadeIn, boolean looping, int probability, float probabilityRerollDelay, int roundRobinHistorySize, @Nonnull SoundEventLayerRandomSettings randomSettings, @Nonnull String[] files)
    • SoundEventLayer

      public SoundEventLayer(@Nonnull SoundEventLayer 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.
    • getVolume

      public static float getVolume(MemorySegment mem)
    • getVolume

      public static float getVolume(MemorySegment mem, int offset)
    • getStartDelay

      public static float getStartDelay(MemorySegment mem)
    • getStartDelay

      public static float getStartDelay(MemorySegment mem, int offset)
    • getFadeIn

      public static float getFadeIn(MemorySegment mem)
    • getFadeIn

      public static float getFadeIn(MemorySegment mem, int offset)
    • getLooping

      public static boolean getLooping(MemorySegment mem)
    • getLooping

      public static boolean getLooping(MemorySegment mem, int offset)
    • getProbability

      public static int getProbability(MemorySegment mem)
    • getProbability

      public static int getProbability(MemorySegment mem, int offset)
    • getProbabilityRerollDelay

      public static float getProbabilityRerollDelay(MemorySegment mem)
    • getProbabilityRerollDelay

      public static float getProbabilityRerollDelay(MemorySegment mem, int offset)
    • getRoundRobinHistorySize

      public static int getRoundRobinHistorySize(MemorySegment mem)
    • getRoundRobinHistorySize

      public static int getRoundRobinHistorySize(MemorySegment mem, int offset)
    • getRandomSettings

      public static SoundEventLayerRandomSettings getRandomSettings(MemorySegment mem)
    • getRandomSettings

      public static SoundEventLayerRandomSettings getRandomSettings(MemorySegment mem, int offset)
    • getFiles

      public static String[] getFiles(MemorySegment mem)
    • getFiles

      public static String[] getFiles(MemorySegment mem, int offset)
    • toObject

      public static SoundEventLayer toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object