public class PlaySoundAtEntityEvent extends EntityEvent
EntityPlayerSP.playSound(SoundEvent, float, float) and World.playSound(EntityPlayer, double, double, double, SoundEvent, SoundCategory, float, float).name contains the name of the sound to be played at the Entity.volume contains the volume at which the sound is to be played originally.pitch contains the pitch at which the sound is to be played originally.newVolume contains the volume at which the sound is actually played.newPitch contains the pitch at which the sound is actually played.name field will cause the sound of this name to be played instead of the originally intended sound.Cancelable.HasResult MinecraftForge.EVENT_BUS.EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Constructor and Description |
|---|
PlaySoundAtEntityEvent(Entity entity,
SoundEvent name,
SoundCategory category,
float volume,
float pitch) |
| Modifier and Type | Method and Description |
|---|---|
SoundCategory |
getCategory() |
float |
getDefaultPitch() |
float |
getDefaultVolume() |
float |
getPitch() |
SoundEvent |
getSound() |
float |
getVolume() |
void |
setCategory(SoundCategory category) |
void |
setPitch(float value) |
void |
setSound(SoundEvent value) |
void |
setVolume(float value) |
getEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setuppublic PlaySoundAtEntityEvent(Entity entity, SoundEvent name, SoundCategory category, float volume, float pitch)
public SoundEvent getSound()
public SoundCategory getCategory()
public float getDefaultVolume()
public float getDefaultPitch()
public float getVolume()
public float getPitch()
public void setSound(SoundEvent value)
public void setCategory(SoundCategory category)
public void setVolume(float value)
public void setPitch(float value)