Class MusicEmitterConfig

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

public class MusicEmitterConfig 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:
    • musicContainerIndex

      public int musicContainerIndex
    • audioCategoryOverrideIndex

      public int audioCategoryOverrideIndex
    • referenceDistance

      public float referenceDistance
    • maxDistance

      public float maxDistance
    • spatialBlend

      public float spatialBlend
    • reverbSend

      public float reverbSend
    • volume

      public float volume
    • loop

      public boolean loop
  • Constructor Details

    • MusicEmitterConfig

      public MusicEmitterConfig()
    • MusicEmitterConfig

      public MusicEmitterConfig(int musicContainerIndex, int audioCategoryOverrideIndex, float referenceDistance, float maxDistance, float spatialBlend, float reverbSend, float volume, boolean loop)
    • MusicEmitterConfig

      public MusicEmitterConfig(@Nonnull MusicEmitterConfig 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.
    • getMusicContainerIndex

      public static int getMusicContainerIndex(MemorySegment mem)
    • getMusicContainerIndex

      public static int getMusicContainerIndex(MemorySegment mem, int offset)
    • getAudioCategoryOverrideIndex

      public static int getAudioCategoryOverrideIndex(MemorySegment mem)
    • getAudioCategoryOverrideIndex

      public static int getAudioCategoryOverrideIndex(MemorySegment mem, int offset)
    • getReferenceDistance

      public static float getReferenceDistance(MemorySegment mem)
    • getReferenceDistance

      public static float getReferenceDistance(MemorySegment mem, int offset)
    • getMaxDistance

      public static float getMaxDistance(MemorySegment mem)
    • getMaxDistance

      public static float getMaxDistance(MemorySegment mem, int offset)
    • getSpatialBlend

      public static float getSpatialBlend(MemorySegment mem)
    • getSpatialBlend

      public static float getSpatialBlend(MemorySegment mem, int offset)
    • getReverbSend

      public static float getReverbSend(MemorySegment mem)
    • getReverbSend

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

      public static float getVolume(MemorySegment mem)
    • getVolume

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

      public static boolean getLoop(MemorySegment mem)
    • getLoop

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

      public static MusicEmitterConfig toObject(MemorySegment mem)
    • toObject

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

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object