Class ForcedMusicTracker

java.lang.Object
com.hypixel.hytale.builtin.audio.components.ForcedMusicTracker
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class ForcedMusicTracker extends Object implements Component<EntityStore>
Per-player forced-music state. Holds the desired container index (the authoritative value driving what this client should play), the last index already sent to the client for dirty-checking, and a pooled UpdateForcedMusic packet reused on each send.
  • Constructor Details

    • ForcedMusicTracker

      public ForcedMusicTracker()
  • Method Details

    • getComponentType

      public static ComponentType<EntityStore, ForcedMusicTracker> getComponentType()
    • setCurrentContainerIndex

      public void setCurrentContainerIndex(int index)
    • getCurrentContainerIndex

      public int getCurrentContainerIndex()
    • setLastSentContainerIndex

      public void setLastSentContainerIndex(int index)
    • getLastSentContainerIndex

      public int getLastSentContainerIndex()
    • getMusicPacket

      @Nonnull public UpdateForcedMusic getMusicPacket()
    • clone

      @Nullable public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.