Class MusicPlayerBlock

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

public class MusicPlayerBlock extends Object implements Component<ChunkStore>
A block-entity component making a block play music from items set into its item container.
  • Field Details

  • Constructor Details

  • Method Details

    • getComponentType

      public static ComponentType<ChunkStore, MusicPlayerBlock> getComponentType()
    • getInsertSoundIndex

      public int getInsertSoundIndex()
    • getRemoveSoundIndex

      public int getRemoveSoundIndex()
    • getStartDelaySeconds

      public float getStartDelaySeconds()
    • getStopDelaySeconds

      public float getStopDelaySeconds()
    • getObservedItemId

      @Nullable public String getObservedItemId()
    • setObservedItemId

      public void setObservedItemId(@Nullable String observedItemId)
    • getPendingStartDeadline

      @Nullable public Instant getPendingStartDeadline()
    • setPendingStartDeadline

      public void setPendingStartDeadline(@Nullable Instant pendingStartDeadline)
    • getPendingRemoveSoundDeadline

      @Nullable public Instant getPendingRemoveSoundDeadline()
    • setPendingRemoveSoundDeadline

      public void setPendingRemoveSoundDeadline(@Nullable Instant pendingRemoveSoundDeadline)
    • buildEmitter

      @Nonnull public MusicEmitterBlock buildEmitter(@Nonnull ItemMusic music, @Nonnull String musicContainerId)
      Builds the emitter for an inserted item: this component's spatial config plus the item's track. The caller must have checked the item names a MusicContainer.
    • clone

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