类 PlayLevelSoundEvent.AtPosition
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.PlayLevelSoundEvent
net.minecraftforge.event.PlayLevelSoundEvent.AtPosition
- 封闭类:
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
.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.event.PlayLevelSoundEvent
PlayLevelSoundEvent.AtEntity, PlayLevelSoundEvent.AtPosition
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器构造器说明AtPosition
(Level level, Vec3 position, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch) -
方法概要
从类继承的方法 net.minecraftforge.event.PlayLevelSoundEvent
getLevel, getNewPitch, getNewVolume, getOriginalPitch, getOriginalVolume, getSound, getSource, setNewPitch, setNewVolume, setSound, setSource
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
position
-
-
构造器详细资料
-
AtPosition
public AtPosition(Level level, Vec3 position, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch)
-
-
方法详细资料
-
getPosition
返回 the position the sound is being played at。- 返回:
- the position the sound is being played at
-