Contents
Class MusicEmitterBlock
java.lang.Object
com.hypixel.hytale.builtin.audio.components.MusicEmitterBlock
- All Implemented Interfaces:
Component<ChunkStore>, Cloneable
A block-entity component declaring a positioned (diegetic) music emitter. Authored under a block
type's "BlockEntity".
-
Field Summary
FieldsFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static MusicEmitterBlockcreate(String musicContainerId, String audioCategoryOverrideId, float referenceDistance, float maxDistance, float spatialBlend, float reverbSend, float volume, boolean loop) Builds an emitter programmatically.intstatic ComponentType<ChunkStore, MusicEmitterBlock> floatintlongfloatfloatvoidsetOriginEpochMillis(long originEpochMillis) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
CODEC
-
-
Constructor Details
-
MusicEmitterBlock
-
-
Method Details
-
getComponentType
-
create
@Nonnull public static MusicEmitterBlock create(@Nonnull String musicContainerId, @Nullable String audioCategoryOverrideId, float referenceDistance, float maxDistance, float spatialBlend, float reverbSend, float volume, boolean loop) Builds an emitter programmatically.volumeis linear gain, not decibels. The origin is left unstamped so the replication system stamps it on component add. -
getOriginEpochMillis
public long getOriginEpochMillis() -
setOriginEpochMillis
public void setOriginEpochMillis(long originEpochMillis) -
getMusicContainerIndex
public int getMusicContainerIndex() -
getAudioCategoryOverrideIndex
public int getAudioCategoryOverrideIndex() -
getReferenceDistance
public float getReferenceDistance() -
getMaxDistance
public float getMaxDistance() -
getSpatialBlend
public float getSpatialBlend() -
toEmitterConfigPacket
-
clone
- Specified by:
clonein interfaceComponent<ChunkStore>- Returns:
- a clone instance of the original component instance.
-