Package net.minecraftforge.event
Class PlayLevelSoundEvent.AtPosition
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.PlayLevelSoundEvent
net.minecraftforge.event.PlayLevelSoundEvent.AtPosition
- Enclosing class:
- PlayLevelSoundEvent
PlayLevelSoundEvent.AtPosition is fired when a sound is played on the 
Level at a specific position.
 This event is fired from Level.playSound(net.minecraft.world.entity.Entity, net.minecraft.core.BlockPos, net.minecraft.sounds.SoundEvent, net.minecraft.sounds.SoundSource, float, float) and Level.playSeededSound(net.minecraft.world.entity.player.Player, double, double, double, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>, net.minecraft.sounds.SoundSource, float, float, long).
 
 This event is cancelable.
 If this event is canceled, the sound is not played.
 
This event does not have a result.
 This event is fired on the MinecraftForge.EVENT_BUS.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.PlayLevelSoundEventPlayLevelSoundEvent.AtEntity, PlayLevelSoundEvent.AtPositionNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionAtPosition(Level level, Vec3 position, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the position the sound is being played at.Methods inherited from class net.minecraftforge.event.PlayLevelSoundEventgetLevel, getNewPitch, getNewVolume, getOriginalPitch, getOriginalVolume, getSound, getSource, setNewPitch, setNewVolume, setSound, setSourceMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
position
 
- 
- 
Constructor Details- 
AtPositionpublic AtPosition(Level level, Vec3 position, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) 
 
- 
- 
Method Details- 
getPositionReturns the position the sound is being played at.- Returns:
- the position the sound is being played at
 
 
-