public class SoundUtil
Class SoundUtil. Provides soundutil functionality for the Hytale server.
java.lang.Object > SoundUtil
Field Summary
playerRefComponent
final
PlayerRef
playerRefComponent
Field playerRefComponent.
soundEvent
final
SoundEvent
soundEvent
Field soundEvent.
packet
final
PlaySoundEvent3D
packet
Field packet.
position
final
Vector3d
position
Field position.
sourceEntity
final
Entity
sourceEntity
Field sourceEntity.
soundEventAsset
final
SoundEvent
soundEventAsset
Field soundEventAsset.
maxDistance
final
float
maxDistance
Field maxDistance.
transformComponent
final
TransformComponent
transformComponent
Field transformComponent.
Method Detail
playSoundEventEntity
static
void
playSoundEventEntity
(final int soundEventIndex, final int networkId, @Nonnull final ComponentAccessor componentAccessor)
Method playSoundEventEntity.
- Parameters:
final intsoundEventIndexfinal intnetworkId@Nonnull final ComponentAccessorcomponentAccessor
PlaySoundEventEntity
public
new
PlaySoundEventEntity
(soundEventIndex, networkId, volumeModifier, pitchModifier)
Method PlaySoundEventEntity.
- Parameters:
soundEventIndexsoundEventIndexnetworkIdnetworkIdvolumeModifiervolumeModifierpitchModifierpitchModifier
playSoundEvent2dToPlayer
static
void
playSoundEvent2dToPlayer
(@Nonnull final PlayerRef playerRefComponent, final int soundEventIndex, @Nonnull final SoundCategory soundCategory)
Method playSoundEvent2dToPlayer.
- Parameters:
@Nonnull final PlayerRefplayerRefComponentfinal intsoundEventIndex@Nonnull final SoundCategorysoundCategory
PlaySoundEvent2D
public
new
PlaySoundEvent2D
(soundEventIndex, soundCategory, volumeModifier, pitchModifier)
Method PlaySoundEvent2D.
- Parameters:
soundEventIndexsoundEventIndexsoundCategorysoundCategoryvolumeModifiervolumeModifierpitchModifierpitchModifier
playSoundEvent2d
static
void
playSoundEvent2d
(final int soundEventIndex, @Nonnull final SoundCategory soundCategory, @Nonnull final ComponentAccessor componentAccessor)
Method playSoundEvent2d.
- Parameters:
final intsoundEventIndex@Nonnull final SoundCategorysoundCategory@Nonnull final ComponentAccessorcomponentAccessor
playSoundEvent3d
static
void
playSoundEvent3d
(final int soundEventIndex, @Nonnull final SoundCategory soundCategory, final double x, final double y, final double z, @Nonnull final ComponentAccessor componentAccessor)
Method playSoundEvent3d.
- Parameters:
final intsoundEventIndex@Nonnull final SoundCategorysoundCategoryfinal doublexfinal doubleyfinal doublez@Nonnull final ComponentAccessorcomponentAccessor
PlaySoundEvent3D
public
new
PlaySoundEvent3D
(soundEventIndex, soundCategory, new Position(x, y, z)
Method PlaySoundEvent3D.
- Parameters:
soundEventIndexsoundEventIndexsoundCategorysoundCategorynewPosition(xyyzz
if
public
else
if
(ignoreSource && sourceRef.equals(playerRef)
Method if.
- Parameters:
ignoreSource &&sourceRef.equals(playerRef
playSoundEvent3dToPlayer
static
void
playSoundEvent3dToPlayer
(@Nullable final Ref playerRef, final int soundEventIndex, @Nonnull final SoundCategory soundCategory, final double x, final double y, final double z, @Nonnull final ComponentAccessor componentAccessor)
Method playSoundEvent3dToPlayer.
- Parameters:
@Nullable final RefplayerReffinal intsoundEventIndex@Nonnull final SoundCategorysoundCategoryfinal doublexfinal doubleyfinal doublez@Nonnull final ComponentAccessorcomponentAccessor